Jump to content
Happy Holidays! Limited Staff Responses: 1/20 - 1/31 ×

Vive Input Utility AngularVelocity


mabulous
 Share

Recommended Posts

The Unity Vive Input Utility reports AngularVelocity for tracked devices, but it‘s not documented in what units this Vector3 is. It does not seem to be the same units as Unity‘s Rigidbody.AngularVelocity, which is in euler angle radians per second.

 

So the question is, how does the AngularVelocity Vector3 reported by the Vive Input Utility express angular velocity?

 

 

And second question: can acceleration and angular acceleration also be queried?

Link to comment
Share on other sites

I have worked out so far that for slow rotations, angularVelocity reported seems to be very accurately represented as Axis around which the rotation happens (in world coordinates) and the length of the vector encodes half-radians per second (why half radians? no idea, but I need to multiply by 2 to get correct results).

 

However, when rotating the controller just slightly faster, values reported become bogus. If I log out the magnitude of the reported vector, I can see that it seems correct as long as the rotation I apply results in a vector magnitude smaller than 1.0. However, as I exceed an angular velocity for which the magnitude of the vector would be 1, magnitude reported becomes smaller again and the vector unusable.

 

This seems to be a bug!

 

In other words, so long as the rotation I apply to the controller is smaller than half a radian per second, the vector returned is correct and usable. As soon as I exceed this angular velocity, reported values are unusable

 

Here is a video of this.

The red graph plotted is the magnitude of the angularVelocity reported. You can see that as long as I rotate the controller slowly, the cube to which I apply the reported angularVelocity rotates the same way as the controller. But as soon as I exceed this half radian per second angular velocity, the rotation applied to the cube doesn't make sense anymore. It's not just that the magnitude would be clamped to one - as soon as it should exceed 1, values reported don't make sense anymore.

Link to comment
Share on other sites

Note: If I retrieve the angularVelocity through the deprecated Unity SteamVR Plugin, it works fine (there the units reported however are radians per second, rather than half-radians per second). But the Angular Velocity in the new Input Utility does not work correctly.

Link to comment
Share on other sites

  • 2 weeks later...

To clarify a bit, are you using the SteamVR plugin with the Vive Input Utility plugin? There are a few features that require the SteamVR - it seems this is one of them. When Vive Input Utility detects the SteamVR plugin it will use that otherwise it will fall back to using the Unity native support for OpenVR, Oculus, Daydream, WaveVR, Microsoft... etc.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...