View Full Version : Orientation Constraint in MXS
ryusen 03-15-2007, 03:42 PM Hello there Maxcript gurus.
I'm a newbie in MXS so forgive me if my question sounds estupido. Well, I was just wondering the Maxscript behind orientation constraints between 2 or more targets.
Thank you very much. :thumbsup:
|
|
d3coy
03-15-2007, 05:07 PM
I'm not exactly sure how it works in the SDK, but with maxscript you can get a rotational value from two object's rotations using the slerp method. Slerp is shorthand for spherical linear interpolation, it just takes two rotation values and interpolates between the two. This is the syntax (taken straight from the docs): slerp <start_quat> <end_quat> <number>
So you supply it with two quaternions (rotation values), and a float value between 0 and 1. A value of .5 will give you the rotation that is 50% between the two quats.
CGTalk Moderation
03-15-2007, 05:07 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.