PcoWSkbVqDnWTu_dm2ix

Mover Constraints

Mover Constraints

10 min

The physics engine includes several Constraint|constraints that apply force or torque to move one or more assemblies. This article outlines every mover constraint and how to create them using Studio’s Create button drop-down.

Creating Constraints

All mover constraints must connect one or two Attachment|Attachments. To create a constraint using the tool workflow:

  1. From the Model tab, access the Create button’s drop-down menu and select the desired constraint type.
  1. On a part, click to place the first attachment and then, if the constraint requires a second attachment, click to place it. This will complete the connection with the chosen constraint type.
AngularVelocity
AlignPosition

Constraint Details

Linear Velocity

The LinearVelocity constraint applies force on a part/assembly to maintain a constant velocity. It can be set to apply force along a datatype/Vector3, line, or 2D plane.

Property Description
LinearVelocity/MaxForce|MaxForce Maximum magnitude of the force vector the constraint can apply.
LinearVelocity/RelativeTo|RelativeTo If set to World, force will be applied in world coordinates, independent of the parent or attachment orientations. If set to Attachment0 or Attachment1, force will be applied relative to Constraint/Attachment0|Attachment0 or Constraint/Attachment1|Attachment1 respectively.
World
Attachment0
LinearVelocity/VelocityConstraintMode|VelocityConstraintMode The default mode is Vector, meaning that force is applied along all three axes as set by LinearVelocity/VectorVelocity|VectorVelocity. The mode can alternatively be set to Line which applies force along just one normalized axis (LinearVelocity/LineDirection|LineDirection). Lastly, the mode can be set to Plane which applies force as a bi-directional datatype/Vector2 (LinearVelocity/PlaneVelocity|PlaneVelocity) across the plane.
LinearVelocity/VectorVelocity|VectorVelocity datatype/Vector3 velocity value when LinearVelocity/VelocityConstraintMode|VelocityConstraintMode is set to Vector.
LinearVelocity/LineDirection|LineDirection The normalized datatype/Vector3 direction for constraining the velocity along a line, when LinearVelocity/VelocityConstraintMode|VelocityConstraintMode is set to Line.
LinearVelocity/LineVelocity|LineVelocity Float value of the velocity when LinearVelocity/VelocityConstraintMode|VelocityConstraintMode is set to Line.
LinearVelocity/PlaneVelocity|PlaneVelocity datatype/Vector2 value of the velocity in each tangent direction of the plane, when LinearVelocity/VelocityConstraintMode|VelocityConstraintMode is set to Plane.
LinearVelocity/PrimaryTangentAxis|PrimaryTangentAxis The primary axis in the plane, when LinearVelocity/VelocityConstraintMode|VelocityConstraintMode is set to Plane. If LinearVelocity/RelativeTo|RelativeTo is set to Attachment0 or Attachment1, applied force depends on that attachment's Attachment/Axis|Axis.
LinearVelocity/SecondaryTangentAxis|SecondaryTangentAxis The secondary axis in the plane, when LinearVelocity/VelocityConstraintMode|VelocityConstraintMode is set to Plane. If LinearVelocity/RelativeTo|RelativeTo is set to Attachment0 or Attachment1, applied force depends on that attachment's Attachment/SecondaryAxis|SecondaryAxis.

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 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.2
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
2
The AlignPosition/MaxVelocity|MaxVelocity, AlignPosition/MaxForce|MaxForce, and AlignPosition/Responsiveness|Responsiveness properties only appear in Studio (Compliance section) if AlignPosition/RigidityEnabled|RigidityEnabled is false.

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.3
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.4
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
3
Enabling PrimaryAxisOnly also exposes the AlignType property; see AlignOrientation|AlignType|AlignType for details.
4
The AlignOrientation/MaxAngularVelocity|MaxAngularVelocity, AlignOrientation/MaxTorque|MaxTorque, and AlignOrientation/Responsiveness|Responsiveness properties only appear in Studio (Compliance section) if AlignOrientation/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