PcoWSkbVqDnWTu_dm2ix

Constraint Movers

Constraint Movers

10 min

This article outlines physical body movers and how to create/configure them using Studio’s Create button drop-down and the Properties window.

Angular Velocity

The AngularVelocity constraint applies torque on a part/assembly to maintain an angular velocity.

Property Description
AngularVelocity/AngularVelocity|AngularVelocity datatype/Vector3|Vector3 force applied to achieve and maintain an angular velocity.
AngularVelocity/MaxTorque|MaxTorque Maximum torque the constraint can apply.
AngularVelocity/RelativeTo|RelativeTo If set to World, the angular velocity vector is used as is. If set to Attachment1 — and the constraint's Constraint/Attachment1|Attachment1 property is set to another attachment — the angular velocity will be affected by that of the other attachment as seen by how the upper-left red part's velocity affects the attached blue part's velocity.1
World
Attachment1
1
Setting RelativeTo to Attachment1 also exposes the ReactionTorqueEnabled property; see AngularVelocity/ReactionTorqueEnabled|ReactionTorqueEnabled for details.

Align Orientation

The AlignOrientation constraint — connecting two Attachment|Attachments applies a torque to make the attachments align. As indicated by the name, it only affects the orientation of the attachments, not their position (to align attachments positionally, see Align Position).

Property Description
AlignOrientation/MaxAngularVelocity|MaxAngularVelocity Maximum angular velocity the constraint can use to reach its goal.
AlignOrientation/MaxTorque|MaxTorque Maximum torque the constraint can use to reach its goal.
AlignOrientation/Responsiveness|Responsiveness How quickly the constraint will attempt to reach its goal. Higher values equal quicker alignment.
AlignOrientation/PrimaryAxisOnly|PrimaryAxisOnly If false, the constraint will apply torque about all 3 axes to achieve alignment. If true, torque will only occur when the primary axes — visually represented by the upward-pointing arrows — become misaligned.2
false (default)
true
AlignOrientation/RigidityEnabled|RigidityEnabled When set to true, the solver will react as quickly as possible to move the attachments together, effectively "snapping" them into alignment. If false, the force will be determined by the AlignOrientation/MaxAngularVelocity|MaxAngularVelocity, AlignOrientation/MaxTorque|MaxTorque, and AlignOrientation/Responsiveness|Responsiveness values.3
AlignOrientation/ReactionTorqueEnabled|ReactionTorqueEnabled By default, the constraint only applies torque to Constraint/Attachment0|Attachment0, while Constraint/Attachment1|Attachment1 remains unaffected. However, torque can be applied to both attachments in equal and opposite directions by enabling AlignOrientation/ReactionTorqueEnabled|ReactionTorqueEnabled.
false (default)
true
2
Enabling PrimaryAxisOnly also exposes the AlignType property; see AlignOrientation|AlignType|AlignType for details.
3
The AlignOrientation/MaxAngularVelocity|MaxAngularVelocity, AlignOrientation/MaxTorque|MaxTorque, and AlignOrientation/Responsiveness|Responsiveness properties only appear in Studio (Compliance section) if AlignOrientation/RigidityEnabled|RigidityEnabled is false.

Align Position

The AlignPosition constraint — connecting two Attachment|Attachments applies force to move the two attachments together. As indicated by the name, it only affects the position of the attachments, not their orientation (to align attachments by orientation, see Align Orientation).

Property Description
AlignPosition/MaxVelocity|MaxVelocity Maximum velocity the constraint can use to reach its goal.
AlignPosition/MaxForce|MaxForce Maximum force the constraint can use to reach its goal.
AlignPosition/Responsiveness|Responsiveness How quickly the constraint will attempt to reach its goal. Higher values equal quicker alignment.
AlignPosition/ApplyAtCenterOfMass|ApplyAtCenterOfMass By default, force is applied to either parent at its attachment location. To apply force at each parent's center of mass regardless of where Constraint/Attachment0|Attachment0 and Constraint/Attachment1|Attachment1 are, toggle on AlignPosition/ApplyAtCenterOfMass|ApplyAtCenterOfMass.
false (default)
true
AlignPosition/RigidityEnabled|RigidityEnabled When set to true, the solver will react as quickly as possible to move the attachments together, effectively "snapping" them into alignment. If false, the force will be determined by the AlignPosition/MaxVelocity|MaxVelocity, AlignPosition/MaxForce|MaxForce, and AlignPosition/Responsiveness|Responsiveness values.4
AlignPosition/ReactionForceEnabled|ReactionForceEnabled By default, the constraint only applies force to Constraint/Attachment0|Attachment0, while Constraint/Attachment1|Attachment1 remains unaffected. However, force can be applied to both attachments in equal and opposite directions by enabling AlignPosition/ReactionForceEnabled|ReactionForceEnabled.
false (default)
true
4
The AlignPosition/MaxVelocity|MaxVelocity, AlignPosition/MaxForce|MaxForce, and AlignPosition/Responsiveness|Responsiveness properties only appear in Studio (Compliance section) if AlignPosition/RigidityEnabled|RigidityEnabled is false.

Vector Force

The VectorForce constraint applies constant force to a part/assembly. The direction and strength of the force is determined by a datatype/Vector3 and can be relative to an attachment on the part, another attachment, or the world coordinate system.

Property Description
VectorForce/Force|Force datatype/Vector3|Vector3 specifying the strength and direction of force.
VectorForce/ApplyAtCenterOfMass|ApplyAtCenterOfMass By default, force is applied to the part/assembly at the location of Constraint/Attachment0|Attachment0. Thus, if its center of mass is not aligned with the direction/point of force, torque will be applied as well.
To apply force at the center of mass regardless of where Constraint/Attachment0|Attachment0 is, toggle on VectorForce/ApplyAtCenterOfMass|ApplyAtCenterOfMass.
false (default)
true
VectorForce/RelativeTo|RelativeTo By default, force is applied relative to Constraint/Attachment0|Attachment0. If the parent part/assembly rotates, the force will change direction to match the adjusted orientation of the attachment; visualize this behavior in how the thruster of a rocket pushes it forward, regardless of the rocket's rotation.
If set to World, force will be applied in world coordinates, independent of the parent or attachment orientations; visualize this behavior as a directional force like the wind blowing against an object.
If set to Attachment1, force will be applied relative to Constraint/Attachment1|Attachment1 and, if the attachment rotates, change to match its orientation.
Attachment0 (default)
World

Torque

A Torque constraint applies constant torque to a part/assembly from its center of mass.

Property Description
Torque/Torque|Torque datatype/Vector3|Vector3 specifying the strength and direction of torque.
Torque/RelativeTo|RelativeTo By default, torque is applied relative to Constraint/Attachment0|Attachment0. If the parent part/assembly rotates, the torque will change direction to match the adjusted orientation of the attachment.
If set to World, torque will be applied in world coordinates, independent of the parent or attachment orientations.
If set to Attachment1, torque will be applied relative to Constraint/Attachment1|Attachment1 and, if the attachment rotates, change to match its orientation.
Attachment0 (default)
World

Line Force

The LineForce constraint applies a force along the theoretical line connecting its two Attachment|Attachments. As the end points (attachments) move, the direction of force will change accordingly.

Property Description
LineForce/Magnitude|Magnitude Magnitude of the force.
LineForce/ApplyAtCenterOfMass|ApplyAtCenterOfMass By default, force is applied to either parent at its attachment location. To focus the line force end points (and thus the direction of force) at each parent's center of mass, toggle on LineForce/ApplyAtCenterOfMass|ApplyAtCenterOfMass.
false (default)
true
LineForce/InverseSquareLaw|InverseSquareLaw When true, the force magnitude is multiplied by the inverse square of the distance, meaning the force will increase exponentially as the two attachments get closer together, like magnets. When using this setting, it's recommended that you set a LineForce/MaxForce|MaxForce threshold to prevent infinite force if the attachments align precisely.
false (default)
true
LineForce/ReactionForceEnabled|ReactionForceEnabled By default, the constraint only applies force to Constraint/Attachment0|Attachment0, while Constraint/Attachment1|Attachment1 remains unaffected. However, force can be applied to both attachments in equal and opposite directions by enabling LineForce/ReactionForceEnabled|ReactionForceEnabled.
false (default)
true
Tags:
  • constraint
  • body mover
  • velocity
  • torque
  • force