r/oculusdev • • Feb 21 '20

Question How to disable Oculus Quest recentering in Unity XR 2019.3?

Previously we could just call ovrp_SetReorientHMDOnControllerRecenter(false);, and set the tracking level to stage, but using 2019.3 with the new XR Plugin workflow, it looks like even though this method returns true, the setting is not honored, and the recenter will still teleport you manually.

The comments layout why you would want to disable it:

If true, the Reset View in the universal menu will cause the pose to be reset. This should generally be enabled for applications with a stationary position in the virtual world and will allow the View Reset command to place the person back to a predefined location (such as a cockpit seat). Set this to false if you have a locomotion system because resetting the view would effectively teleport the player to potentially invalid locations.

Also, ovrp_GetAppShouldRecenter() seems to always return false, even during a recentering operation. So I have no idea why AllowRecenter used to work on the Quest, but the calls appear to not be working now, in 2019.3.

So, in 2019.3, using the new XR Plugin system -- how can I disable location recentering, so that the player can't use it to teleport behind walls, etc.?

12 Upvotes

14 comments sorted by

4

u/Oculus_NinjaGG Oculus Dev Support Feb 21 '20

Thanks for flagging this, I've opened a task with our team to take a look.

3

u/BrainSlugs83 Feb 21 '20

Awesome! Would love to see a fix.. But in the short term, if you're able to identify a workaround or a hack to make it work, that would be super helpful! 👍🏻

0

u/[deleted] Feb 29 '20

[deleted]

1

u/BrainSlugs83 Feb 29 '20

No, I did not. The last time I can verify the feature was working was before they added hand tracking... and considering I'm calling the c# wrapper api directly, I'm thinking this might be a firmware issue...

Looking at my list of old projects, I think I was using Unity 2019.2.13f1? Might have been a later one. Not sure what plugin version that would have been...

0

u/[deleted] Feb 29 '20

[deleted]

1

u/BrainSlugs83 Mar 01 '20 edited Mar 01 '20

Nice, I'll take a look.

Edit: Hmmm... even with the prefabs, I don't think that works anymore either... -- OVRManager.boundary.GetGeometry(OVRBoundary.BoundaryType.OuterBoundary) just returns an empty array for me, and switching to PlayArea returns an array of four items, but they're all the same point @ (0.1, 0.0, 0.0).

Either that, or I think it might require a non-stationary boundary to work? ☹

0

u/[deleted] Feb 29 '20

[deleted]

1

u/BrainSlugs83 Mar 01 '20 edited Mar 01 '20

Maybe I'm misunderstanding... but if you lock the position to some other object... then how do you let the player walk around?

Edit: Nevermind... It's a continuation of the OVRBoundary thing that you linked me to -- that's a super cool idea.

1

u/BrainSlugs83 Mar 01 '20

I've tried commenting out any mention of recentering in various Oculus scripts with no luck.

Yeah, that's not going to work. I've tried running with NO Oculus prefabs or scripts (not even imported) and recentering still works. The thing is though, you used to be able to turn it off via the above method call (via P/Invoke). But now that doesn't work -- either in the Oculus prefabs or without...

2

u/ExternalPraline1318 Jun 14 '23

Still an issue? Trying to disable re-center in unity or simply on the device itself would be nice

1

u/RaspberrySea2744 Oct 04 '24

ever get a solution??

1

u/ExternalPraline1318 Oct 04 '24

Had to write custom code using spatial anchors to reverse recenter events. I haven't checked to see if they've added any other options/workarounds lately, though.

1

u/blueblob0 May 06 '20

This still seems to be an issue any word of a fix?

0

u/[deleted] Feb 28 '20

[deleted]

1

u/BrainSlugs83 Apr 15 '20

turn it off via the above method call (via P/Invoke). But now that doesn't work -- either in the Oculus prefabs or without...

Not as far as I know; u/Oculus_NinjaGG any update on this?

3

u/vonMoose Jun 14 '23

Also trying to disable the re-center event

1

u/RaspberrySea2744 Oct 17 '24

ever find a solution?