r/oculusdev • u/megamatz • Mar 15 '21
Sleep recenters my camera
I'm making a game in Unity for Quest 2 and I have a problem with the camera.
If I'm positioned in a certain way in the game world and then takes off the headset, it goes into sleep within a few seconds (like it should and I want it to). But when I put it on again a few seconds later everything is recentered in the direction I'm currently facing when putting it on (this could be facing the opposite way). This is really frustrating if you make a game were you are in a cockpit and you all of a sudden is sitting in the wrong position of facing the wrong way.
However. If I turn off the guardian system in the developer tab the world is NOT recentered after sleep, but stays the same as when I took the headset off. The tracking is remembered and is exactly how it was when I took the headset off. Is it possible to make it work like this with guardian turn on too? I can't see why not or why it's even doing this!
I'm very confused. Hope someone can help!
Thanks
1
u/Darth-Neskin Mar 15 '21
For troubleshooting purposes go into oculus developer hub and disable the proximity sensor. Now I'm warning you that by doing this every time you take off the headset you must hit the power button to turn off the screen. Otherwise it will stay on indefinitely until power failure/loss.
1
u/megamatz Mar 15 '21 edited Mar 15 '21
Forgot to mention. The same thing happens when I press the power button to turn off the screen and then immediately hit it again to turn on. It act like a recenter button and resets the view. Is this normal? I have the same behavior on two different headsets so it can't be hardware.
1
u/Azured7 Mar 29 '21
Same issue. I am trying to find an elegant way to keep a mixed reality camera from losing its tracking calibration every time the headset blips or loses tracking for a moment.
1
u/veul Apr 15 '21
Dude I thought I was the only one. I have to restart unity play mode each time. So disable guardian seems to work is what you said? I'll try it out
1
u/megamatz Mar 16 '21
I did some more testing with a new project and it seems like this is just how the Quest 2 works? If you toggle the power button it resets the view.
But I still can't understand why this doesn't happen when you have the guardian turned off. It can obviously remember the position, so why not always do like this? Why would anyone want it to reset???