How read World Y-Axis from Free Camera


Hi Guys,

i have look 1-2 hour at the manual, but my english is very poor. How can i read the Y-Value of a Free Camera.

thank you guys so much for help.

hot chip


Use quatToEuler2 on the rotation.controller.value should return what you want.

quatToEuler2 <quat> [left]Returns the same Euler value for the given Quaternion as shown in the Transform Type-In dialog. Available in 3ds Max 2008 and higher. Previously available in the [AVG ] Avguard Extensions.
It only works properly when using it on the rotation.controller.value. For example in a test scene I have rotations displayed as X:-28.3988 Y:-4.72909 Z:-33.7424 in the UI.

quatToEuler2 $.rotation
(eulerAngles 26.431 -11.7636 32.1679)
[left]quattoeuler2 $.rotation.controller.value
(eulerAngles -28.3988 -4.72909 -33.7424)




ah cool Eric, and thank you very much. I try that.

hot chip


Right-hand vs left-hand rotation,
Also apparently there is no difference between quatToEuler and quatToEuler2

quatToEuler2 (inverse $.rotation)
quatToEuler2 $.rotation.controller.value
(eulerAngles 44.4497 -27.0388 -29.3219)
(eulerAngles 44.4497 -27.0388 -29.3219)
quatToEuler (inverse $.rotation)
quatToEuler $.rotation.controller.value
(eulerAngles 44.4497 -27.0388 -29.3219)
(eulerAngles 44.4497 -27.0388 -29.3219)


Just for the sake of mentioning, you could also use the ExposeTransformHelper. Might be a lil’ too much in this example, but when it gets more complex it really gives easy access to all those values (even has this ‘copy to maxscript’ button beneath every value).


Thanks for that note on the topic, I guess that is what this Note from the Maxscript Help is referring to:

Note: Rotation in the internal transformation matrices is left-handed in contradiction to the 3ds Max user interface and MAXScript. Take care when mixing rotation derived from these matrices and rotation used in rotation-related functions or from rotation properties.



This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.