I am trying to measure the orientation of a camchase object in my project with the script below:
However, I am having some difficulties. The camy value (which I am trying to measure) seems to only range from -90-90 degrees. 45 could mean that the camera is rotated 45 degrees clockwise, or 135 degrees. I am not sure what is causing this. How can I fix it?
Googling the problem lead me to this: http://www.3drad.com/forum/index.php?topic=5434.0;wap2 but it wasn't much help.
Thanks for any suggestions you guys might have,
George.
Code: [Select]
iQuaternionToEulerAngles(CAMCHASEQUATERNION,camx,camy,camz);
However, I am having some difficulties. The camy value (which I am trying to measure) seems to only range from -90-90 degrees. 45 could mean that the camera is rotated 45 degrees clockwise, or 135 degrees. I am not sure what is causing this. How can I fix it?
Googling the problem lead me to this: http://www.3drad.com/forum/index.php?topic=5434.0;wap2 but it wasn't much help.
Thanks for any suggestions you guys might have,
George.