We are integrating the Razer Hydra to our UDK project and
we ran into a rather interesting problem with rotations.
We send the Hydra position and rotation quaternion to
UDK. Everything works great except that something
unexpected happens when roll gets close to ±90 degrees.
In the following video I slowly twist my wrist and try
harder and harder to keep the arrow pointing straight
ahead:
http://www.zspline.net/temp/RollIssue.mp4
(The arrow’s rotation is 0,0,0 at the beginning.)
With roll=0 heading and pitch reacts normally but as roll
increases they become more and more sensitive and at
the end it’s just impossible to keep them from moving.
We convert the incoming quaternion from Y-up to Z-up
and then convert that into an yaw/pitch/roll rotator.
Removing the up vector conversion does not help, only
puts the problem onto a different axis.
We confirmed that we receive the same quaternion
what the Hydra reports, by simultaneously logging data
in the example OpenGL application and UDK.
It’s also not gimbal lock. That appears in Unreal at
Pitch ±90 degrees so I can actually go there with the
Hydra. Yaw and roll does the same thing at that point
but that is nothing like the violent swinging we have at
roll=±90.
Has anyone seen something like this before? We ran out
of ideas so I’d appreciate any suggestions and wild
speculations.