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.accelerationBut 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!
