Documentation - Maxscript

< Back to main maxscript documentation

Aim_Constraint : RotationController


The Aim_Constraint controller constraints an object's orientation so that it's aiming at another object, similar to the lookat constraint, but it builds the rotation using a quaternion method, this allows the object have less flipping angles than the traditional look at constraint (one instead of two).

Properties

<Aim_Constraint>.target Node

Get/set the node that the controller is aiming at.

<Aim_Constraint>.use_target Boolean default: true

Enables or disables the target node.

<Aim_Constraint>.aim_axis Integer default: 0

Get/set the axis that is aiming to the target node:

0 - X.
1 - Y.
2 - Z.

<Aim_Constraint>.aim_axis_flip Boolean default: false

This parameter flips the axis that is aiming to the target node.

<Aim_Constraint>.align_axis Integer default: 0

Get/set the reference axis that is used in the Quat method to build the aim rotation. The flip will happen at the negative side of this axis. The flip will happen only in this angle instead of the two flipping angles that the look at constraint has.

0 - X.
1 - Y.
2 - Z.

<Aim_Constraint>.align_axis_flip Boolean default: false

This parameter flips the align axis.

<Aim_Constraint>.align Integer default: 0

Get/set the alignment reference type that is used in this controller:

0 - World.
1 - Parent.
2 - Node.

<Aim_Constraint>.align_node Node

Get/set the node that is used as reference in the Quat method to build the aim rotation in the case that the align type is set to "Node".

<Aim_Constraint>.viewline_length Float default: 100.0

Get/set the length of the lookat vector in the viewport either in generic units (when .viewline_length_abs is set to true,) or as percentage of the distance from the object to the target point.

<Aim_Constraint>.viewline_length_abs Boolean default: true

Get/set the state of the Viewline Length Absolute checkbox. When set to true, the lookat line in the viewport will have a length in absolute generic units. When set to false (the default), the length will be relative to the distance from the object to the target. See .viewline_length description above.



< Back to main maxscript documentation