AlignOrientation
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).
Torque created by AlignOrientation is applied about the center of mass of the parent of the attachments, or the center of mass of parts rigidly connected to the parents.
When configuring this constraint, it may be helpful to study Roblox Units to understand how Roblox units compare to metric units.
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.
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.
Torque Magnitude
You can configure this 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
This constraint can use either one or two attachments in calculating its goal. See Mode for details.
Summary
Properties
The constraint's axis alignment type.
The CFrame orientation with which the constraint will attempt to match the orientation of Attachment0.
A Vector3 world space location toward which the primary axis will attempt to align.
Maximum angular velocity the constraint can use to reach its goal.
Maximum torque the constraint can use to reach its goal.
Whether the constraint uses one or two attachments in calculating its goal.
The direction of the goal's X axis, represented as a unit Vector3.
Determines how the constraint's axes are affected by torque.
Whether the constraint applies torque only to Attachment0, or to both attachments in equal and opposite directions.
Controls how quickly the constraint reaches its goal. Higher values cause the attachment(s) to align more rapidly.
Whether torque is dependent on other properties, or if the physics solver reacts as quickly as possible to complete the alignment.
The direction of the goal's Y axis, represented as a unit Vector3.
Properties
Indicates if the constraint is currently active in the world.
The Attachment that is connected to Constraint.Attachment1.
The Attachment that is connected to Constraint.Attachment0.
The color of the constraint.
Toggles whether or not the constraint is enabled.
Toggles the constraint's visibility.