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:
|Url||(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.|
|Controller Class(es)||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.|
|Control||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.|
|Origin Name||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.
|Origin Scale||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.
|VG_ExternalController class||VG_ControllerProfile||Control hand motion by|
|VG_EC_Leap||VG_CP_UltraLeap.HandTracking||LeapMotion controller; Ultraleap API.|
|VG_EC_Manus||VG_CP_Manus.HandTracking||Manus Finger Tracking; Manus Core SDK|
|VG_EC_Oculus||VG_CP_Oculus.OVRLib.HandTracking||Oculus Finger Tracking; Oculus API|
|VG_EC_OVR||VG_CP_Oculus.OVRHand.HandTracking||Oculus Finger Tracking; OVRHand component; Oculus|
|VG_EC_Steam||VG_CP_Steam.HandTracking||OpenXR controllers; SteamVR API|
|VG_EC_UnityXR||VG_CP_Unity.UnityXR||UnityXR controllers; UnityXR API|
|VG_EC_UnityXRHands||VG_CP_Unity.XRHands||Unity XR Hands controllers; Unity XRHands API|
|VG_EC_UnityXRInteraction||VG_CP_Unity.XRInteraction||Unity XR Interaction controllers; Unity XR Interaction Toolkit API|
|VG_EC_Generic||VG_CP_Common.Generic||Unity transforms / fallback solution|