Open mpolsz opened 5 years ago
@mpolsz Couldn't reproduce with GearVR and the latest master. Will try Oculus Go tomorrow.
@mpolsz On Oculus Go it seems reasonable to me too. The controller points to where it pointed before in my tests, though one might expect the controller to be completely recentered (point to the center of the screen).
I am probably missing something so: how is the use of resetYaw different for you then long-pressing the Oculus home button which does the same thing semantically?
Attached a video of what I am seeing on Oculus Go. video.zip
@liaxim My bad, I wrote about turning head 90 degrees and what I meant was head AND controller. On video you point controller in [0, 0, -1] direction so it does not go out of sync. I will try reproducing this bug and upload video tomorrow.
@mpolsz Ok, got it. Will look into it. Btw isn't long-pressing the home button on the controller doing what you want?
@mpolsz See https://github.com/Samsung/GearVRf/pull/2032.
@liaxim I can confirm that using getGVRContext().recenterPose()
instead of mainScene.getMainCameraRig().resetYaw()
works as intended.
One more thing we found out is that framework uses resetYaw()
internally in GVRViewManager::updateSensoredScene
and it can sometimes mess with rotation.
@mpolsz Thanks for pointing updateSensoredScene out. Will look into that. Why wouldn't you rely on long pressing the home button on the controller to recenter?
I am unsure we can merge this change though. It is not likely easy to implement for Daydream. There is no similar API in Daydream that does what Oculus' vrapi_RecenterPose does. Daydream says this:
On the Daydream platform, recentering is handled automatically and should never be triggered programatically by applications.
.
In our app (Evryplace) we reset pose automatically every time user changes scene (our internal scene, not GVRf one). We do that, so after arriving in next scene user faces predefined direction independent of headset rotation. What we do on scene change is basically:
In our app we use
mainScene.getMainCameraRig().resetYaw();
to recenter user view to known position. AfterresetYaw()
camera is reseted properly (user looks in [0,0,-1] direction) but Oculus Go controller is pointing in semi random direction. You can reproduce this bug in my fork. Start application, turn head 90 degrees left or right and pull trigger on controller to call.resetYaw()
. Scene will be in front of user but controller will point in wrong direction.