Getting started
Last updated
Last updated
In Unity Editor, open Package Manager. Click on Add package from git URL and paste the following URL:
Click on Add and Unity will download the UPM package. This package has no dependencies.
Download Oculus Integration 20.1 from Asset Store or the Oculus Archive and import it.
Switch platfrom to Android.
Set Texture compression to ASTC.
This may take a while, you can take a break 😊
HPTK relies on nVidia PhysX and Unity's built-in Configurable Joints to simulate hand physics. HPTK has been tested under the following recommended settings:
Physics:
Default Solver Iterations: 50.
Default Solver Velocity Iterations: 25.
Enable Adaptative Force: enabled
Friction Type: Two Directional Friction Type.
Solver Type: Temporal Gauss Seidel.
Default values for other variables.
Time:
Fixed Timestep: 0.01.
Player/Other (Oculus Quest):
Scripting backend: ILCPP.
Target architecture: ARM64.
Graphic APIs: Remove Vulkan (only OpenGLES3).
The following table shows a comparison of how this configuration affects the realism of the simulation:
Default
Configured
Install XR Plugin Management. Add Oculus in Plug-in Providers.
Set Stereo Rendering Mode (Android) to Multiview.
The built-in URP shader will not work in the default Oculus stereo rendering mode (PC): Single Pass Instanced. If you want to use this shader and you're experiencing rendering issues, please check that you are targeting to Android platform and that you are using Multiview as Oculus stereo rendering mode (Android).
Delete any MainCamera in scene. Add OVRCameraRig prefab.
Add OVRHandPrefabs for each hand as children of LeftHandAnchor and RightHandAnchor (children of OVRCameraRig object).
Set Hand Tracking Support (OVRManager component in OVRCameraRig object) to Controllers And Hands.
Set Hand Type & Skeleton Type for OVRHand & OVRSkeleton components.
Disable components OVRSkeletonRender, OVRMesh, OVRMeshRenderer & SkinnedMeshRenderer for every OVRHandPrefab.
Add SpAvatar+Dummy prefab to the Scene (make sure that SpAvatar is close to OVRCameraRig).
Add HPTKCore prefab to the Scene. Drag & drop CenterEyeAnchor (child of OVRCameraRig) into TrackedCamera field in CoreModel component (HPTKCore).
Download OVRSkeletonTracker.cs. Store it in Assets/(YourCustomFolder)/Scripts/Input/.
Add 2 empty gameobjects as children of SpAvatar>InputDataProviders in the scene. Rename them to OVRSkeletonTracker.L and OVRSkeletonTracker.R.
Add a OVRSkeletonTracker component to each of them.
Set Hand Data and Bone Data fields for each OVRSkeletonTracker component with their corresponding OVRHandPrefabs.
Set OVRSkeletonTracker.x as Input Data Provider in SpAvatar>ProxyHand.X>[Modules]>Input.X>InputModel.X (InputModel component).
HPTK includes different configuration assets which default values have already been fine-tuned for a generic purpose. If you need more sensible gesture detection or different hand physics configurations, you can modify the following configuration assets:
CoreConfiguration.
HandPhysicsConfiguration.