Forum Discussion
ludotex
12 years agoHonored Guest
Realigning view after drift
Hello,
I'd like to implement a button to realign the camera to compensate for drift just like there is in most good demos (B key in Titans of Space, for example).
Being a newb with Unity I am wondering on how to tackle this. I know about the input side (pressing a button and such), but I am not sure where to look for the actual reseting of the camera. There must be a vector to reset to Forward or something like this somewhere.
I have looked into the OVR scripts but I cant really figure out whats going on.
Any hints (example, or function to call) would be much appreciated :geek:
I'd like to implement a button to realign the camera to compensate for drift just like there is in most good demos (B key in Titans of Space, for example).
Being a newb with Unity I am wondering on how to tackle this. I know about the input side (pressing a button and such), but I am not sure where to look for the actual reseting of the camera. There must be a vector to reset to Forward or something like this somewhere.
I have looked into the OVR scripts but I cant really figure out whats going on.
Any hints (example, or function to call) would be much appreciated :geek:
6 Replies
Replies have been turned off for this discussion
- AnonymousI've been able to reset the view by pushing down on the Dpad on the xbox360 controller... I didn't add it, I assume its part of OR camera setup.
- ChrisJDHonored GuestIf you're using the 0.24 SDK then magnetic yaw correction is on by default as long as it has been calibrated in the Oculus Utility. Which means you shouldn't have a drift problem in that case.
If you want to reset the forward direction (or set an initial forward direction) use OVRDevice.ResetOrientation(0); - ludotexHonored Guest
"ChrisJD" wrote:
If you want to reset the forward direction (or set an initial forward direction) use OVRDevice.ResetOrientation(0);
Thanks ChrisJD, that's exactly what I was looking for.
I am getting much less drift with 0.2.4 also (after calibration) which is great too. - MOnsDaRHonored GuestAre there any good practices on resetting the orientation if the user does not have any input devices (i.e. he cannot press a button to reset the orientation)?
In my case the user is looking through the Rift just to observe the environment. There is no Keyboard or Gamepad available. After looking around for awhile I start getting a drift in Yaw-direction. - cyberealityGrand ChampionYou could trying using some sort of head gestures, like nodding a few times.
- CaliberMengskExplorerYou could also have an object floating is space (say a mostly transparent sphere) that they could look at for say, 3 seconds, and it pops up a "look forward" text and it resets after 5 seconds of the message being up.
Just an idea.
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
- 1 month ago