A Jenga game in VR
- Create a new Unity URP Project
- Window -> Package Manager -> Import XR plugin management
- Edit -> Project Settings -> Player -> Active input handling -> Both
- Restart Unity Project
- Window -> Package Manager -> Advanced -> Enable preview packages
- Package Manager -> XR Interaction Toolkit
- Package Manager -> XRI Toolkit Samples
- Add the left and right input samples to presets
- Add filters to the presets
- Edit -> Project Settings -> XR Plugin Management -> Enable Oculus (Android/PC)
- In the sample scene, remove all the assets except the Ground
- Import custom package -> Choose VR Jenga Asset pack
- Add the skybox
- Add the table
- Add the Jenga blocks
- Create the XR Rig Action based
- Add the Input System Manager
- Add the controllers into parent objects
- Create two more copies of controllers for both left and right each, name them Grab, Push and Teleport
- Add Grab, Push, Teleport prefabs inside each controller type
- Setup the controllers to match drag, push and teleport
- Add Controller Switcher to both, add the objects
- Open the Input asset, add "Controller Switcher" button to both Left and Right
- Locomotion System
- Teleportation Provider
- Teleportation Area