Quest
Last updated
Last updated
These steps are a continuation of the first part of this guide.
Switch target platfrom to Android.
Set texture compression to ASTC (optional)
In Project Settings / XR Plug-in Management install XR Plug-in Management (if you don't have it yet).
In the Android tab, set Oculus as plug-in provider. The expected result is shown in the following image.
Download and import Oculus Integration from Package Manager, Asset Store or the Oculus Archive.
Go to Assets/Oculus/OculusProjectConfig.asset
and check that Hand Tracking Support is set to Controllers and Hands or Hands Only.
Oculus Integration is a dependency for the input data providers OVRInputSwitch and OVRSkeletonTracker, which read hand and bone data from OVRHand and OVRSkeleton components.
Open the Integration Manager, click on Oculus and import the built-in integration package.
In the Project window, within the Assets folder, search for "DefaultSetup". You should see some entries.
Drag & drop the prefab called DefaultSetup.Oculus into your scene.
This prefab contains:
OVRCameraRig preconfigured to support Quest hand tracking + Touch controllers.
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 without Oculus Link.
On build, OVRInputSwitch will be used.
Make sure to delete any other extra camera that could prevent OVRCameraRig from working properly.
If you want to use handtracking in PlayMode, go to HPTK singleton and set OVRInputSwitchers also for HPTK.leftEditorIdp
and HPTK.rightEditorIdp
. More info about HPTK singleton here.
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 interact with 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 both Touch controllers and hands (yay!).