Forum Discussion
TheIntellify
6 months agoHonored Guest
How to Prevent Physical Up/Down Head Movement from Affecting Camera Y Position in Meta SDK (Unity)
Hi all,
I'm developing a VR experience using the Meta All-in-One SDK in Unity, and I want to restrict the camera's vertical movement caused by physical player movement (like crouching or standing up).
Right now, when the player physically moves their head up or down, the OVRCameraRig's Y position changes accordingly, which affects gameplay. For design reasons, I want the camera to stay fixed at a certain Y position (e.g., a seated or fixed-height experience), but still allow head rotation and horizontal movement (X/Z).
Here's what I'm trying to achieve:
Maintain camera rotation (look around)
Allow X/Z movement (if the user moves left/right or forward/back)
Prevent Y-axis movement from real-world head height changes
Is there a recommended way to lock or ignore vertical head movement using Meta's SDK?
I’ve tried clamping the Y position manually in LateUpdate, and it works, but I’m wondering if there's a cleaner or SDK-level way to do this (e.g., a setting in OVRCameraRig, OVRManager, or elsewhere).
Any suggestions or best practices would be appreciated!
Thanks!
2 Replies
Replies have been turned off for this discussion
Pretty confident you don't want to do that. If your head is doing something that isn't reflected in the camera movement, like moving or tilting your head up or down - you'll make your users sick instantly.
- RiverExplorerStart Partner
I think that your LateUpdate() method is the way to do it.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 1 year ago