Align Orientation

The AlignOrientation constraint applies torque to align two attachments, or to align one attachment with a goal orientation. As indicated by the name, it only affects the orientation of the attachments, not their position (to align attachments positionally, see AlignPosition).

Affected Axes

The axes affected by torque are controlled through the constraint's AlignType property. When set to PrimaryAxisParallel, PrimaryAxisPerpendicular or PrimaryAxisLookAt, torque will only occur when the primary axes become misaligned. Otherwise, the constraint will apply torque about all 3 axes to achieve alignment.

AlignType = AllAxes
AlignType = PrimaryAxisParallel

Reactionary Torque

By default, the constraint only applies torque to Attachment0 while Attachment1 remains unaffected. If desired, torque can be applied to both attachments in equal and opposite directions by enabling ReactionTorqueEnabled.

ReactionTorqueEnabled = false
ReactionTorqueEnabled = true

Torque Magnitude

You can configure the AlignOrientation constraint to apply the maximum torque that constraints allow through the RigidityEnabled property. When true, the physics solver reacts as quickly as possible to complete the alignment. When false, the torque is determined by MaxTorque, MaxAngularVelocity, and Responsiveness.

Attachment Mode

The Mode property specifies whether the constraint uses one or two attachments in calculating its goal. By default, this is TwoAttachment, meaning that the constraint attempts to match the orientation of Attachment0 with the orientation of Attachment1, disregarding CFrame, PrimaryAxis, and SecondaryAxis.

If set to OneAttachment, the constraint disregards Attachment1 and attempts to match the orientation of Attachment0 with the orientation of CFrame, or match the attachment's Axis and SecondaryAxis with the constraint's PrimaryAxis and SecondaryAxis properties respectively.