A First Look at the Sensor Setup
In VirtualGrasp we use the terms “sensor” and “controller” exchangeably since a VR controller is essentially a sensing device for hand poses.
In MyVirtualGrasp.cs, a sensor setup can be configured for any controller (or sensor) supported through various VG_ExternalControllers. A number of controller profiles are already included in VirtualGrasp, such as Oculus controllers, mouse control, finger tracking, among others. See Sensors page for detailed instruction.
You can use VirtualGrasp without a VR headset and your scene does not need to be a VR-enabled scene.
If you do not have a headset, you can use the “VG_EC_Mousehand” profile to get started and control the hands with the mouse.
If you do have a headset, we recommend to use the “VG_EC_UnityXRHand” profile (after assuring that you enabled your scene for VR) to get started, through UnityXR.
Important: VG main loop runs in FixedUpdate rather than Update in order to synchronize VG powered hand object interaction with physics calculation in Unity. This can cause some visual inconsistency showed as non-smooth hand movement with/without holding an object.
We recommend you to resolve this by setting the Time.fixedDeltaTime to match the refresh rate of the device you are targetting (e.g. 1f / 72f to target 72 hz displays).
You can set it on Start or Awake Time.fixedDeltaTime = 1f / refreshRate.
Alternatively you can also set it manually in the editor at: Project Settings -> Time -> Fixed Timestep. In this field you can write for example 1/72 and hit enter, if 72 is the refresh rate you’re targetting.
If you have a headset the easiest way is to setup Unity XR Management for your project as follows:
- in the "Edit" menu, choose Project Settings→XR Plugin Management and "Install XR Plugin Management"
- enable "Oculus" as Plugin-Provider (assuming you are using a Quest)
- Right click "Camera" in Hierarchy and select "XR→Convert Camera To XR Rig"
- connect Quest with USB cable (the charging cable)
- Select "Enable Oculus Link" inside the headset