OpenXR loss of tracking behavior

With OpenXR in 4.27, when motion controllers lose tracking, they snap to the tracking space origin, and then snap back to the tracked position once they regain it. There doesn’t seem to be any point to this behavior, and it can cause a lot of unintended consequences if things like meshes with collision or physics enabled are attached to the controllers. I’d consider this behavior a bug.

The behavior seems to be caused by FOpenXRHMD::GetCurrentPose() returning an identity transform when the tracking is invalid, combined with FOpenXRInputPlugin::FOpenXRInput::GetControllerOrientationAndPosition() passing a reference to the output position directly to the former function and not checking for the return value.

I submitted a bug report of this to the issue tracker a few weeks ago, but I didn’t receive any confirmation, so I’m not sure if it went through. I’m posting about it here too just in case.


Yes! this is not desired behavior…
I would rather they pause at last known location rather than snap to origin. This keeps happening when I’m actively using them due to controller/controller occlusion and then POP one of my hands is on the floor and the buttons are triggering from that location causing all sorts of wacky movement. I’m glad I’m not the only person having this happen… maybe it will be addressed.

Has anyone built in safeguards as a workaround? I was debating perhaps double checking my controller location every frame and if my controllers jump to origin disabling input … idk, I haven’t fully thought it through but was thinking I might need to do something since it’s a hassle when it happens and it happens enough to be a hassle.

1 Like

I had the same issue in 4.26 with the SteamVR plugin as well. I tried to get around it by using some utility function to detect if the controllers were tracking and disabling physics + teleporting them when the state changed. I couldn’t get it working reliably, so I ended up modifying the plugin instead (along with a modification to make it not launch SteamVR on startup).