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 asynchronously.
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.