Forum Discussion
naomi_k123
5 years agoHonored Guest
How to get angular velocity and acceleration of headset
Is there a way to get the angular velocity and acceleration of the VR user (the headset itself) in unity? I am only looking for angular velocity and acceleration because the user will be stationary while only moving around their head.
In the oculus developers documentation there is page titled 'get raw sensor data' but doesn't actually show how.
Thanks!
In the oculus developers documentation there is page titled 'get raw sensor data' but doesn't actually show how.
Thanks!
1 Reply
- I haven't tried myself, but this might work:OVRPlugin.Vector3f angularVel = OVRPlugin.GetNodeAngularVelocity(OVRPlugin.Node.Head, OVRPlugin.Step.Physics); OVRPlugin.Vector3f angularAcc = OVRPlugin.GetNodeAngularAcceleration(OVRPlugin.Node.Head, OVRPlugin.Step.Physics);I'm not sure if the last parameter should be Physics or Render. I've seen Render used by someone on here in another thread.Edit: I don't like posting things I haven't tried myself... so I just tested it.The angular velocity part looks like it works correctly. The numbers seem reasonable.The angular acceleration doesn't seem to work though, even with the headset sitting on a stable surface it has random values (positive and negative) on every axis.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 years ago