Skip to content

Latest commit

 

History

History
171 lines (132 loc) · 9.68 KB

mover-constraints.md

File metadata and controls

171 lines (132 loc) · 9.68 KB
title description
Mover constraints
Mover constraints apply force or torque to move one or more assemblies.

The physics engine includes the following Class.Constraint|Constraints that apply force or torque to move one or more assemblies. In addition, various mechanical constraints are available which behave as conceptual mechanical connections, including hinges, springs, ropes, and more.

<Card variant="outlined" style={{height: '100%'}}> Linear Velocity

[LinearVelocity](../physics/constraints/linear-velocity.md) applies force on an assembly to maintain a constant velocity along a 3D vector, line, or 2D plane

<Card variant="outlined" style={{height: '100%'}}> Angular Velocity

[AngularVelocity](../physics/constraints/angular-velocity.md) applies torque on an assembly to maintain a constant angular velocity

<Card variant="outlined" style={{height: '100%'}}> Align Position

[AlignPosition](../physics/constraints/align-position.md) applies force to move two attachments together, or to move one attachment to a goal position

<Card variant="outlined" style={{height: '100%'}}> Align Orientation

[AlignOrientation](../physics/constraints/align-orientation.md) applies torque to align two attachments, or to align one attachment with a goal orientation

<Card variant="outlined" style={{height: '100%'}}> Vector Force

[VectorForce](../physics/constraints/vector-force.md) applies constant linear force on an assembly

<Card variant="outlined" style={{height: '100%'}}> Torque

[Torque](../physics/constraints/torque.md) applies constant torque on an assembly from its center of mass

<Card variant="outlined" style={{height: '100%'}}> Line Force

[LineForce](../physics/constraints/line-force.md) applies force along the theoretical line connecting its two attachments

Constraint visualization

To accurately visualize constraints in Studio, you can use the following options from the Model tab:

Constraints tools indicated in Model tab

**Show Welds** — Show `Class.WeldConstraint|WeldConstraints`, separately from the visualization of other constraints.

**Constraint Details** — Show complete visual details of non-weld constraints.

**Scale** — Relative scale of visualizations.

In addition to the above visualization, you can view colored outlines around mechanisms (groups of parts that share simulation step and [network ownership](../physics/network-ownership.md)) by toggling on **Mechanisms** from the [Visualization Options](../studio/ui-overview.md#visualization-options) widget in the upper‑right corner of the 3D viewport.

Create constraints

Mover constraints typically connect one or two Class.Attachment|Attachments or Class.Bone|Bones. When connected to Class.Bone|Bones, the constraint will use their animated position and orientation.

To create a mover constraint, you can use either the Create tool or the Explorer window.

  1. In the Model tab, access the Create button's picker menu and select the desired constraint type, for example Angular Velocity.

    Constraint picker indicated in Studio toolbar
  2. In the 3D viewport, hover over any Class.Part or Class.MeshPart and click to add a new Class.Attachment to the part at the visualized point. Alternatively, hover over and click an existing Class.Attachment or Class.Bone to use it for the constraint.

  3. Some mover constraints utilize or support a secondary attachment in their functionality, so the tool might prompt you to repeat the previous step on another Class.Part, Class.MeshPart, or Class.Attachment, or Class.Bone.

    AngularVelocity using one attachment [AngularVelocity](../physics/constraints/angular-velocity.md) using one attachment AlignPosition using two attachments [AlignPosition](../physics/constraints/align-position.md) using two attachments
  1. In the Explorer window, hover over the intended parent, click the button, and insert the desired constraint from the drop‑down menu, such as a LinearVelocity constraint.

    New LinearVelocity in Explorer window.
  2. With the new constraint selected, locate its currently empty Attachment0 property in the Properties window.

    Constraint's Attachment0 property highlighted in Properties window.
  3. Link the Attachment0 property to an Class.Attachment or Class.Bone in two consecutive steps:

    1. In the v window, click in the Attachment0 row to reveal the selection cursor.

    2. In the Explorer window, click on the target Class.Attachment or Class.Bone.

    Mouse pointer hovering over Attachment0 property in Properties window. Target attachment indicated in Explorer window.
  4. Some mover constraints use or support a secondary Class.Attachment or Class.Bone in their functionality. If necessary, repeat the previous step on the Attachment1 property in the Properties window. For instance:

    • By default, AlignPosition and AlignOrientation align their primary attachment (Attachment0) with a secondary attachment (Attachment1).
    • LineForce requires two attachments to apply force along the theoretical line connecting them.

Physical simulation

To simulate physics while moving or rotating parts, you can switch to Physical mode in the Model tab, effectively forcing parts to obey physical limitations. For example, if you drag one part around the scene and it collides with another part, it will physically push that part out of the way.