Skip to main content
New Participant
November 15, 2017

Headset acceleration or velocity in Unity3D

Hi Everybody,



I am trying to access the Headset
acceleration or velocity in Unity3D. I am interested in the raw data as well as
a fused version. As I read in previous blog posts it is not possible to access
the raw data but at least the fused data somehow. For my scenario it is
important that positional tracking is disabled.




So far I have tried the Oculus Utilities 1.19.0 with
Unity 2017.1 and Unity 2017.2 . I have tried to access the acceleration with
OVRDisplay class:



OVRManager.display.acceleration




But I am not getting any result. Besides that I tried
using the Unity3D API with the following:




List<XRNodeState> nodeStates = new List<XRNodeState>();


UnityEngine.XR.InputTracking.GetNodeStates(nodeStates);


foreach(XRNodeState ns in nodeStates)


{


    Vector3 acceleration;


    if (ns.TryGetAcceleration( out acceleration)){


        // do something with acceleration


}


}



Here I get a result if one of the Oculus cameras is
seeing the Rift. But if the Rift is not visible velocity and acceleration are (0,0,0).
As I mentioned I cannot use positional tracking in my scenario.


Am I doing something wrong or just missing something?
Or are this values not forwarded if positional tracking is disabled?






Thanks in advance!

This topic has been closed for replies.

1 reply

sleendeAuthor
New Participant
November 20, 2017
Thanks a lot for your help regarding this issue.

Unfortunately
in our use case the described solution will not work because we are tracking
the Rift in a moving environment. Having the raw acceleration would be helpful for
overcoming the latency of our external positional tracking system.

If you know
any other workaround for getting the acceleration data this would be great
help.