I am developing a VR game on Unity now. And I have a problem controlling XR origin.
I would like to restrict XR origin (Main Camera) movement so as not to make the player go outside of the available area. However, I am not sure how to achieve this goal. Could anyone help me out?
Situation
Using XR origin on XR toolkit.
I am using a Teleportation System and Continuous Move Provider (Action-based) for the left controller.
Things I’ve tried:
- Added Character Control to the main camera and set Box Collider on the side of the available zone.
- Tried to restrict Transform.Position from the script.
Neither of these did not work.