XRInputSubsystem.TryRecenter() is not synchronous

Just a quick find that cost me a couple of debugging hours the other day, in the hopes it might save those hours for somebody else:

Unity’s XRInputSubsystem.TryRecenter() works asynchronous.

Maybe not as far as Unity’s (2019.4 at the time of writing) code is concerned, but in what the HMD drivers do in the background. In hindsight it really seems quite logical, that the hardware would take a moment to reorient itself, yet it was not what I expected. Furthermore, this behaviour is not mentioned in the function’s documentation – so here you go.

Also keep in mind this bonus find: At least with the Oculus Rift it will not recenter the HMD at all, if the current position lies too close (up to a centimeter or so) to its current origin – despite TryCenter()returning true. Make of that what you will.

Leave a Reply

Your email address will not be published. Required fields are marked *

Hello!

Portrait of Paul Alexandrow I am a freelance IT consultant, software developer and commercial pilot from Vienna, Austria.

In this Blog I post random notes about findings and solutions to technical issues that I encounter during my daily - or sometimes nightly - work.

more about me

Topics

AR AVR Bourne Shell C# Cg/HLSL DevOps Embedded Development Events Microcontrollers Monitoring Unity3d VR XR