Jump to content

Vive Input Utility AngularVelocity


mabulous

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...