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

Angular Velocity, Angular Acceleration Broken? (has anyone gotten this to work on the latest unity?)

sebasrezsebasrez Posts: 10
NerveGear
edited May 10 in Unity
I'm using 1.13.0 and my output for Angular Velocity is always 0,0,0. I tried using the example Room and the grabbable and grabber also output 0 as well. I am not sure what to do but from older requests it should be outputting as a Quaternion but other reports say it should be a Vector 3? I am not sure how to get it working?

Comments

  • cyberealitycybereality Posts: 22,707 Oculus Staff
    Moving to developer forum.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i
    Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
  • sebasrezsebasrez Posts: 10
    NerveGear
    Anything concerning this?

    Bump
  • sebasrezsebasrez Posts: 10
    NerveGear
    Any updates on this?
  • imperativityimperativity Posts: 1,439 Oculus Staff
    I'm using 1.13.0 and my output for Angular Velocity is always 0,0,0.

    Going off the information you have provided here, this sounds like a Unity project. If you are using 'OVRPlugin.angularVelocity' for results, this would make sense as this is an internal API.

    If this is the case, try using 'OVRInput.GetLocalControllerAngularVelocity' which should return the correct non-zero Vector3s.



  • sebasrezsebasrez Posts: 10
    NerveGear
    Hi imperativity,

    yes this is a Unity project. I have 'controllerAngularVelocity = OVRInput.GetLocalControllerAngularVelocity(controllerInput);
    Debug.Log (controllerAngularVelocity);'

    And it is not returning anything.
  • sebasrezsebasrez Posts: 10
    NerveGear
    any ideas? Or has anyone gotten this to work?
  • sebasrezsebasrez Posts: 10
    NerveGear
    Hi, any updates on this? I still can't get it to work, as it continues returning zero.
  • imperativityimperativity Posts: 1,439 Oculus Staff
    Hi,

    Here is the overview of the class structure for using OVRInput for 1.13 Oculus Utilities:

    https://developer3.oculus.com/doc/1.13-unity/class_o_v_r_input.html

    OVRInput.GetLocalControllerAngularVelocity is a static vector3

      "Gets the angular velocity of the given Controller local to its tracking space in radians per second around each axis. Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Quaternion.identity."

    You are using touch controllers, right?
  • sebasrezsebasrez Posts: 10
    NerveGear
    Yes I am using touch controllers. I also went into the example scene that comes with 1.13, which has the cubes that should be running angularVelocity and I set them to debug.Log their value and it also comes out as Zero. 

    The objects(cubes) do not rotate based on how I am throwing them in the example scene.
  • imperativityimperativity Posts: 1,439 Oculus Staff
    edited May 12
    Ok. This seems like a problem that has been reported previously in the recent past here on the forums.

    Does this seem similar (?): https://forums.oculus.com/developer/discussion/50790/incorrect-version-of-oculus-runtime-being-reported-meaning-getlocalcontrollerangularvelocity-is-zero

     I'm going to have this looked at on our end and see what else I can find out for you. Thanks for your patience here.
  • sebasrezsebasrez Posts: 10
    NerveGear
    Thank you very much!
  • sebasrezsebasrez Posts: 10
    NerveGear
    I was using an older version of Unity, I do get a result when I updated to the latest version as specified in the thread, thanks for the link!
  • imperativityimperativity Posts: 1,439 Oculus Staff
    Great to hear! Thanks for updating the thread with your results.
Sign In or Register to comment.