Notifications
Clear all

[Closed] Orientation Constraint in MXS

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.

1 Reply

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>

[font=Verdana]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.
[/font]