/ Forums
New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

Incorrect version of Oculus Runtime being reported meaning GetLocalControllerAngularVelocity is zero

TheStonefoxTheStonefox Posts: 10
Virtual Boy (or Girl)
I'm trying to use the `GetLocalControllerAngularVelocity` method on Oculus Utilities 1.12

But it's always reporting zero.

Further investigation shows that on line 788 of OVRPlugin it is checking to see if the runtime version is at least the same as 1.12

if (version >= OVRP_1_12_0.version)  return OVRP_1_12_0.ovrp_GetNodePoseState(stepId, nodeId).AngularVelocity;

This never gets called as outputting version shows it as `1.10.0` even though my Oculus Home shows the version as 1.12.0

Is this because Unity is defaulting to the built in version of Oculus Runtime which is still on an older version and therefore it's not working?

From looking at it Unity 5.4.4 is using the Oculus 1.10.0 runtime and Unity 5.5.2 is using the Oculus 1.11.0 Runtime

If this is the case then I can only assume `GetLocalControllerAngularVelocity` is never going to work in Unity 5.4 or 5.5.

Is this correct?

Comments

  • TheStonefoxTheStonefox Posts: 10
    Virtual Boy (or Girl)
    Sorry, didn't read the full notes:

    https://forums.oculus.com/developer/discussion/50551/oculus-utilities-for-unity-5-version-1-12-0

    Only 5.4.5 and 5.3.8 are currently supported by 1.12.0
  • imperativityimperativity Posts: 977 Oculus Staff
    Hi,

    Did you follow the instructions on uninstalling Oculus Utilities here?

    And please consult the compatibility chart for Unity in this sticky post for exact Unity versions compatible with the Oculus Utilities here.

    Also this bug fix was included in Oculus Utilities 1.12:

    *Changed OVRInput.GetAngularVelocity(..) and OVRInput.GetAngularAcceleration(..) to return Vector3 instead of Quaternion, avoiding issues for rates above 2*pi. Developers who need the old behavior for any reason may use Quaternion.Euler(..).

    Let me know if you need any further assistance.






  • TheStonefoxTheStonefox Posts: 10
    Virtual Boy (or Girl)
    I'm now using Unity 5.4.5 and the Controller Angular Velocity does not seem to be correct.

    If i flick my wrist upwards, the object does not spin from bottom to top, but rather from left to right:

    see here:

    http://giphy.com/gifs/l0Iy5rntoJxgemljy

    I can see that it's getting the vector3 and flipping the z. But I don't see why that would rotate around another axis?

    Am I missing something?
  • TheStonefoxTheStonefox Posts: 10
    Virtual Boy (or Girl)
    This is an animation of the same throwing action using Oculus Utilities 1.11 and not using the OVRInput angular velocity calculations, but instead manually calculating them from the previous and current rotation information:

    http://giphy.com/gifs/l0Iy6zipH7gDKutwY

    This is how I would expect it to behave
  • imperativityimperativity Posts: 977 Oculus Staff
    Hi,

    I can't reproduce this.

    Can you verify your batteries are charged and that the issue doesn't occur in OVR/Scenes/Room.unity?
Sign In or Register to comment.