Description
VG_ExternalControllerManager is a static class representing the controller abstraction towards VirtualGrasp.
It should be used in any VG_MainScript, such as MyVirtualGrasp.cs, where it is initialized after the VG_Controller itself initialized:
override public void Awake()
{
base.Awake();
VG_Controller.Initialize();
VG_ExternalControllerManager.Initialize(this);
}
VG_ExternalControllerManager.cs is a public script so that it is extendable, for example to add more controllers or functionalities.
The VG_ExternalControllerManager is managing different VG_ExternalControllers. We call it external controller, because an external source or plugin is providing VirtualGrasp with the input data in Unity (but external to VirtualGrasp). In most cases, the source is a plugin provided by the hardware manufacturer for your engine of choice.
In contrast to external controllers we term internal controllers as those that link the controllers native library directly to VirtualGrasp. Internal controllers are by default not supported for the VirtualGrasp SDK, due to third-party distribution regulations.
Thus, whenever we speak of controllers or sensors in this documentation, we refer to external controllers.
VG_ExternalController Class
To link together a controller plugin with VG, the VirtualGrasp SDK provides a base class VG_ExternalController. The VirtualGrasp SDK already includes a few ready-to-use child classes for the controllers listed below. For each controller, you will also find its VG_ControllerProfile, among others to configure its Controller Axis Mapping.
- VG_EC_MouseHand for Mouse control.
- VG_EC_UnityXRHand for all XR controllers that are supported through the UnityXR API.
- VG_EC_UnityXRHands for all XR controllers that are supported through the Unity XRHands API.
- VG_EC_UnityInteractionHand for all XR controllers that are supported through the Unity XR Interaction Toolkit API.
- VG_EC_SteamHand for all XR controllers that are supported through SteamVR API.
- VG_EC_OculusHand for Oculus Finger Tracking which is supported through the Oculus API.
- VG_EC_OVRHand for Oculus Finger Tracking which is supported through the OVRHand component of the Oculus.
- VG_EC_LeapHand for LeapMotion controller which is supported through the Ultraleap API.
- VG_EC_GenericHand as a fallback solution.
While all these classes can serve as tutorials to understand how a VG_ExternalController can be setup, please refer to each particular page for further details on just that particular controller.
If this video shows "This video is unavailable," please try to refresh the page.