Dear all I need to set my camera to be fixed and pointing to the same position regardless of the head movements.
I’ve found UnityEngine.VR.InputTracking.Recenter() where I can recenter, but it’s probably not the best option to use in update method …
Can I somehow disable headtracking and set camera position to be fixed?
many thanks
3 Answers
3
Found the solution.
When you say head input tracking, I assume you are referring to the Position Tracking.
To disable it:
- First import the Oculus Utilities
- In the folder OVR-> Scripts, there is a script called: OVRManager. Add this script to your camera.
- Deselect the option “Use Position Tracking”
As simple as that.
You’re probably going to need to selectively disable and rewrite parts of the Oculus plugin code to do so. I don’t believe it’s written into the framework because it simply should not be done. Head tracking is enabled even in loading screens for Oculus because turning it off is a one-way trip to vomit town. Our brains aren’t good at handling a sudden loss of autonomy.
I was synchronizing Oculus camera/player controller with 3Drudder so had to find and override Y rotation.
For all three axis must work like this:
OVRi/Assets/OVR/Scripts/Util/OVRPlayerController.cs at master · real7a/OVRi · GitHub line 326
transform.rotation = Quaternion.Euler(euler);
change to = Quaternion.identity for fixed zero orientation;
Hope it helps 
Any news on this topic?
– elhongoI had the same problem with the HTC Vive, now it may not exist, but with the SteamVR package I dug into the positioning of the SteamVR objects, (SteamVR_TrackedObject.cs) which had a couple lines of code in there for positioning a given SteamVR object - in that case I didn't need the Vive controllers so I was able to have it be a general hack. I haven't played with the Oculus plugins so this may not exist, but perhaps there's a positioning script in the Utilities you could find and put a couple of booleans to control?
– BigHandInSky