Closed skelder closed 4 years ago
@skelder Which device you are using? Could you provide more detailed information? For which platform(PC, Android, Oculus or OpenVR devices), any other SDKs(versions) imported to your project and which version of VIU?
Sorry for lack of information
Devices used for testing: Vive Pro with 2 vive controllers OS: windows PC Additional SDK: oculus integration due to the fact that I have to ship this to oculus quest in the end And No steamVR if its important VIU version : 1.10.4.0 from the asset store
I tested with newest version 1.10.6 as well but it just kept on reporting 0 vector No matter where I checked on Update or FixedUpdate
@skelder Previously, Unity 2017.1 and before does not have angular velocity API. If you have using Unity 2017.2 or newer, please modify the following script to enable the GetAngularVelocity API. Under Assets\HTC.UnityPlugin\VRModule\Modules\UnityEngineVRModule_2017_1.cs, after line 269, add
var angularVelocity = default(Vector3);
if (m_nodeStateList[i].TryGetAngularVelocity(out angularVelocity)) { currState.angularVelocity = angularVelocity; }
Please let me know if you still have issue.
Great now it seems to work! Thanks a lot.
Was there any specific reason to not include the angular velocity in those files in the latest release or was it just a omission during the update?
Also this is not really related to the problem, but I was curious about the difference between the Getvelocity and the GetVelocityEx.
I could not find the documentations about it and looking at the code just confused me even further.
What is the exact difference between them?
Great now it seems to work! Thanks a lot.
Was there any specific reason to not include the angular velocity in those files in the latest release or was it just a omission during the update?
We didn't notice that Unity provides angular velocity API in Unity 2017.2 and newer version.
Also this is not really related to the problem, but I was curious about the difference between the Getvelocity and the GetVelocityEx.
I could not find the documentations about it and looking at the code just confused me even further.
What is the exact difference between them?
API ending with Ex is a generic API which can use for TrackerRole. For example, VivePose.GetAngularVelocity(TrackerRole.Tracker1), this will have compile error But, VivePose.GetAngularVelocityEx(TrackerRole.Tracker1) will work
Thanks a lot!
VivePose.GetAngularVelocity returns 0,0,0 vector3. Is there any specific way it should be accessed?