Package Manager Install XR Interaction ToolKit
XR Interaction Tool Kit Package > Samples > Import Starter Assets (Optional Simulator for non VR Headset Users)
Project Window> Samples>XR Interaction Toolkit > 2.0.0 > Starter Assets then select the asset “XRI Default Left Controller” (as well as right) and in the Inspector click “Add to ActionBasedController default” at the top of the inspector window
Edit>Project Settings>Preset Manager then type in “Right” and “Left” to the left of the appropriate Preset input field
Edit>Project Settings>XR Plug-in Management and enable desired platforms
In the Hierarchy window add XR> XR Origin (Action Based)
Add an “Input Action Manager” Component to the XR Rig
Add to the action assets list the “XRI Default Input Actions” asset
Add Grab Interactables, rigidbodies and colliders to objects you want to pick up
Add Visuals for Hands by assigning a model into the model prefab property of each VR Controller component or make the hand models children of the controllers
You can replace Line and Ray Interactors from Hands with Direct Interactors to reach out and grab objects instead of pointing and pulling the trigger
Commenti