How read World Y-Axis from Free Camera

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  01 January 2011
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.

mfg
hot chip
 
  01 January 2011
Use quatToEuler2 on the rotation.controller.value should return what you want.
Quote: quatToEuler2 <quat>
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)
quattoeuler2 $.rotation.controller.value (eulerAngles -28.3988 -4.72909 -33.7424)
-Eric

__________________
"The Evil Monkey hiding in your closet."
 
  01 January 2011
ah cool Eric, and thank you very much. I try that.

mfg
hot chip
 
  01 January 2011
Originally Posted by PiXeL_MoNKeY: Use quatToEuler2 on the rotation.controller.value should return what you want.It only works properly when using it on the rotation.controller.value.

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)
 
  01 January 2011
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).
 
  01 January 2011
Originally Posted by Ruramuq: Right-hand vs left-hand rotation,
Also apparently there is no difference between quatToEuler and quatToEuler2
Thanks for that note on the topic, I guess that is what this Note from the Maxscript Help is referring to:
Quote: 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.
-Eric
__________________
"The Evil Monkey hiding in your closet."
 
  05 May 2011
..........

Last edited by MikieK : 05 May 2011 at 09:28 PM. Reason: oops wrong thread...
 
  05 May 2011
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:01 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.