UnityXR
Last updated
Last updated
These steps are a continuation of the first part of this guide.
In Project Settings / XR Plug-in Management install XR Plug-in Management (if you don't have it yet).
If you're using an Oculus device, set Oculus as plug-in provider.
In the Project window, within the Packages folder, search for "DefaultSetup". You should see some entries.
Drag & drop the prefab called DefaultSetup.UnityXR into your scene.
This prefab contains:
XRRig: preconfigured to use floor as origin and lower camera's near cliping distance.
HPTK singleton with default configuration assets and default Input Data Providers.
Input Data Providers (IDPs):
On PlayMode, PoseSkeletonTrackers will be used. You can move/rotate/animate those IDPs for testing and debugging purposes.
On build, UnityXRControllerTracker will be used.
Make sure to delete any other extra camera that could prevent XRRig from working properly.
In the Project window, within the Packages folder, search for "DefaultAvatar". You should see some entries.
Drag & drop the prefab DefaultAvatar for the render pipeline you are using.
DefaultAvatars contain:
Oculus hand models (LICENSE).
Puppet (slave) hand with colliders.
Input module.
Gesture Detection module.
Including an extra gesture for PowerGrip pose (HandPoseMatch).
Puppet module.
Contact Detection module.
Add some colliders and rigidobdies to play with. Try to control them in PlayMode by moving/rotating the PoseSkeletonTrackers.
Build and install your app in your device. You now should be able to control the physical hands of DefaultAvatar with your controllers (yay!).
Make sure to delete any other extra camera that could prevent OVRCameraRig from working properly.