How to get VR controller acceleration / IMU data with minimal latency? Can it be done via OpenXR?

Hi there!

Can I get the VR controllers velocity / acceleration / IMU data via OpenXR (or any other way)?

I’m working on a PC VR project in Unreal Engine. I want to detect when the user “shakes” a controller. Is there any functionality in OpenXR to do that with minimal latency?

I tried using controller velocity to detect a shake, but that way I can get some false positives. If I use acceleration data derived from controller velocity I can get good results (i.e., no false positives), but the “shake” detection happens 3 or 4 frames after the detection used by velocity:

In the image above: V1 (red line) is controller X velocity, Acc (magenta line) is acceleration derived from velocity, dots mark when a shake was detected, x mark when the algorithm will start looking again for another shake.

Any information and suggestions are welcome.

Thanks!

1 Like