Distance Joint

The distance joint tries to keep the two specified particles at a fixed distance from each other. This is useful for glueing two particles together, or for creating a spring-like effect between two particles.

To use the distance joint, you need to:

  1. Add the Distance Joint component on a GameObject.

    To add the Distance Joint component, click on Add Component > MAGES > Mesh Deformations > Joints > Distance Joint.

    ../../../_images/AddDistanceJoint.PNG
  2. Assign the two Actors that you want to connect with the Joint:

    Drag and drop the two actors in the Actor and Connected Actor fields:

    experimental_features/mesh_deformations/joints/img/AssignActorsDistanceJoint.PNG
  3. Specify the particles of the actors that you want to connect.

    You can specify the particles by using the Distance Joint Editing Tool. To enter the Distance Joint Editing Mode, click on the Edit Distance Joint button from the scene toolbar:

    ../../../_images/edit-joint.PNG

    Once you are in the Distance Joint Editing Mode, you can select the particles that you want to connect by clicking on them. The selected particles will be highlighted in red color, and a line will be drawn between them:

    ../../../_images/edit-joint-tool.PNG
  4. Fine tune the Joint properties.

    Below you will find a list of the properties of the Distance Joint and a short description of them:

    Property

    Description

    Actor

    The first connected actor.

    Simulation Mesh Particle Index

    The index of the particle of the first actor that you want to connect. Will be set from the Distance Joint Editing Tool.

    Connected Actor

    The second connected actor.

    Connected Simulation Mesh Particle Index

    The index of the particle of the second actor that you want to connect. Will be set from the Distance Joint Editing Tool.

    Target Distance

    The distance the joint will try to keep between the two particles.

    Compliance

    A value from [0, Infinity] that indicates how stiff the joint will be. Lower values will make the joint stiffer.

    Breakable

    When enabled the joint will break if the force applied to it is higher than the Break Force.

    Break Force

    The force that when exceeded the joint will break. Only valid when the Breakable flag is set.