--
[ Picked text/plain from multipart/alternative ]
I'm having a problem getting the correct angle.  I seem to be stuck getting
an angle between 0 and 180, due to the W value always being 0.0 to 1.0 and
not -1.0 to 1.0.

---CODE---
----------------------------------------------------------------------------------------
Quaternion qNewOrientation;
Vector axis;
float angle;

AngleQuaternion( m_angSpawnAngle, qNewOrientation );
QuaternionAxisAngle( qNewOrientation, axis, angle );
----------------------------------------------------------------------------------------

If I pass QAngle(0,90,0)  I will get 0.707106 or 90 angle
If I pass QAngle(0,270,0)  I also get 0.707106 or 90 angle

The latter is suppose to be negative.  When I revert the quaternion back to
a QAngle it gets the orientation correctly.
The formula QuaternionAxisAngle uses is correct because websites show the
same algorithm used.
Anyone out there familiar with Quaternions know how I could possibly solve
this? Thanks in advance!
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to