Jump to content

How to recenter?


focus3fan

Recommended Posts

I followed the tutorial to set up the project and it worked fine.

I would like to add a function to reset the front (recenter). Do you provide an API for that? Please let me know if you have any sample code.

I tried the code below but it didn't work.

InputDevices.GetDeviceAtXRNode(XRNode.Head).subsystem.TryRecenter();


Environment

Device : VIVE focus 3
Engine : Unity 2021.3.7f1
Base Project : OpenXR for Mobile VR > Tutorial
Plug-in : VIVE Wave OpenXR Plugin - Android 1.0.2

 

Link to comment
Share on other sites

Hi @focus3fan,

Thanks to bring this question for us.

Currently in OpenXR there is no definition to do re-center.

For system-level re-center, Focus 3 provides “Reset View” in VIVE menu.

For in-app re-center, app has to record the pose transform by itself and covert runtime pose with this re-center transform to target pose.

 

Here are more description from OpenXR:

 

When a user needs to recenter LOCAL space, a runtime may offer some system-level recentering interaction that is transparent to the application, but which causes the current leveled head space to become the new LOCAL space. When such a recentering occurs, the runtime must queue the XrEventDataReferenceSpaceChangePending event, with the recentered LOCAL space origin only taking effect for xrLocateSpace or xrLocateViews calls whose XrTime parameter is greater than or equal to the changeTime provided in that event.

 

When the user redefines the origin or bounds of the current STAGE space, or the runtime otherwise switches to a new STAGE definition, the runtime must queue the XrEventDataReferenceSpaceChangePending event, with the new STAGE space origin only taking effect for xrLocateSpace or xrLocateViews calls whose XrTime parameter is greater than or equal to the changeTime provided in that event.

Event  (XrEventDataReferenceSpaceChangePending) is provided from Openxr runtime for app.

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...