VirtualGrasp provides VG_ControllerProfiles (in Unity as ScriptableObjects) to configure a number of sensor-related settings and thereby allows you to quickly switch between different controllers.
Examples for VG_CP_Unity.XRHands and VG_CP_Oculus.OVRLib.HandTracking:
The elements of a VG_ControllerProfile are explained in this table:
|(optional) A URL can be provided to a more detailed documentation of the controller that this VG_ControllerProfile relates to. Press enter twice in the text field to open the URL.
|name of one or more external controllers, as a string. Note, here we supports adding a list of controller classes (see below), separated by ‘;’, in order of priorization. E.g. “VG_EC_Oculus;VG_EC_UnityXR” (assuming that you have enabled both controllers properly) will use Oculus hand tracking as a priority, but if no hands are tracked, it will fallback to UnityXR controllers.
|specify what this sensor element controls. If you added two sensors, then one could control wrist position, rotation and haptics, another controls fingers and grasp for example.
|Finger Control Type
|specify how sensor controls the finger motion. See Finger Control Type.
|when the virtual hands do not match to the position or rotation of your real hands holding the controllers, you can adjust the offset to synchronize them. Note that the hand coordinate system’s axes, XYZ, are defined like you strech out three axes with thumb, index, and middle finger (i.e. X is thumb up, Y is index forward, and Z is middle inward) of each hand. In other words, with a fully flat hand, all finger point along the positive Y axis, and your palm faces the positive Z axis.
|set this to the GameObject name that should act as the origin of your controller data. For example, “XRRig” for the default Unity XR Rig (unless you renamed it). If no GameObject with this name is found (or you leave it empty), the origin will be the zero-origin.
To overwrite this behavior, you can use the Origin field.
|you can add a scale multiplier to the sensor data if you like. The default is (1,1,1).
|Rotation Types and Hand Mappings
|Rotation Types and Hand Mappings define how this controller deviates in terms of bone pose orientations. You can find a more detailed documentation on these axis mappings here.
Ready-to-Use VG_ControllerProfiles and VG_ExternalController classes
To link together a controller plugin with VG, the VirtualGrasp SDK provides a base class VG_ExternalController.
The VirtualGrasp SDK also already includes a few ready-to-use child classes for the controller input methods listed below. For each controller, you will also find a VG_ControllerProfile as a scriptable object that enables the respective controller class.
|Control hand motion by
|LeapMotion controller; Ultraleap API.
|Manus Finger Tracking; Manus Core SDK
|Oculus Finger Tracking; Oculus API
|Oculus Finger Tracking; OVRHand component; Oculus
|OpenXR controllers; SteamVR API
|UnityXR controllers; UnityXR API
|Unity XR Hands controllers; Unity XRHands API
|Unity XR Interaction controllers; Unity XR Interaction Toolkit API
|Unity transforms / fallback solution