-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hand rotationAngle matrix issue #188
Comments
I just added a jsfiddle demonstrating the problem: |
It looks like rotationAngle is being derived via the "Motions API" , which is filtered differently from the hand itself. We'll clean this up in a future release. For now, here's a way to get a matrix from the hand data directly: http://jsfiddle.net/kLs8ymye/2/ This prints out first the rotationAngle/motions api values, and the calculations based off of hand direction and normal. Edit: We also found a couple of other subtle issues, which are documented here: #191 |
Thanks that workaround helped. |
I am porting some Leap Motion code from Java to Javascript. I have noticed that the hand.rotationAngle in JS has an issue where it takes a while to update to the new rotation. Other rotation axis are also incorrectly affected during this transition, so it appears there may be a mistake in the matrix calculations.
The yaw/pitch/roll functions appear to update to the new rotation correctly.
The problem can be reproduced here (modifying the loop.html example).
To reproduce the problem, rotate your hand around y axis clockwise, then go anticlockwise for a sec and stop, and look at the output. The Yaw goes from + to - correctly, but the Matrix rotation stays positive for a while then eventually goes negative. If you output other axis here as well you will see them incorrectly rotating as well.
The same rotationAngle code in Java works correctly and the angles update immendiately.
The text was updated successfully, but these errors were encountered: