Mover Constraints

The physics engine includes several 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 Attachments. To create a constraint using the Create tool workflow:

  1. (Optional) Enable all of the constraint visualization options from the Model tab.

  2. Access the Create button's drop-down menu and select the desired constraint type.

  3. 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 an assembly to maintain a constant velocity. It can be set to apply force along a Vector3, line, or 2D plane.

Relativity

Application of velocity can be controlled through the constraint's RelativeTo property. 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 Attachment0 or Attachment1 respectively.

RelativeTo = World

RelativeTo = Attachment0

Angular Velocity

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

Relativity

Application of velocity can be controlled through the constraint's RelativeTo property. If set to World, the angular velocity vector is used as is. If set to Attachment1 and the constraint's 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.

RelativeTo = World

RelativeTo = Attachment1

Align Position

The AlignPosition constraint applies force to move two attachments together, or to move one attachment to a goal position. As indicated by the name, it only affects the position of the attachments, not their orientation (to align attachments by orientation, see Align Orientation).

Force Location

By default, force is applied to either parent at its attachment location. Alternatively, force can be focused at each parent's center of mass by toggling on ApplyAtCenterOfMass.

ApplyAtCenterOfMass = false

ApplyAtCenterOfMass = true

Reactionary Force

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

ReactionForceEnabled = false

ReactionForceEnabled = true

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 Align Position).

Affected Axes

The axes affected by torque are controlled through the constraint's PrimaryAxisOnly property. 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.

PrimaryAxisOnly = false

PrimaryAxisOnly = true

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

Vector Force

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

Force Location

By default, force is applied to the assembly at the location of Attachment0. Thus, if its center of mass is not aligned with the direction/point of force, torque will be applied as well. If desired, force can be focused at the center of mass by toggling on ApplyAtCenterOfMass.

ApplyAtCenterOfMass = false

ApplyAtCenterOfMass = true

Relativity

By default, force is applied relative to Attachment0. If the parent 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 RelativeTo is 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 RelativeTo is set to Attachment1, force will be applied relative to Attachment1 and, if the attachment rotates, change to match its orientation.

RelativeTo = Attachment0

RelativeTo = World

Torque

A Torque constraint applies constant torque to an assembly from its center of mass.

Relativity

By default, torque is applied relative to Attachment0. If the parent assembly rotates, the torque will change direction to match the adjusted orientation of the attachment.

If RelativeTo is set to World, torque will be applied in world coordinates, independent of the parent or attachment orientations.

If RelativeTo is set to Attachment1, torque will be applied relative to Attachment1 and, if the attachment rotates, change to match its orientation.

RelativeTo = Attachment0

RelativeTo = World

Line Force

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

Force Location

By default, force is applied to either parent at its attachment location. If desired, force can be focused at each parent's center of mass by toggling on ApplyAtCenterOfMass.

ApplyAtCenterOfMass = false

ApplyAtCenterOfMass = true

Inverse Square Law

When InverseSquareLaw is 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 MaxForce threshold to prevent infinite force if the attachments align precisely.

InverseSquareLaw = false

InverseSquareLaw = true

Reactionary Force

By default, the constraint only applies force to Attachment0, while Attachment1 remains unaffected. However, force can be applied to both attachments in equal and opposite directions by enabling ReactionForceEnabled.

ReactionForceEnabled = false

ReactionForceEnabled = true