Skip to main content

Distance Joint 2D

Attaches two objects together and keeps them at a certain, fixed distance apart.

Add a Distance Joint 2D Component

To add a Distance Joint 2D component:

  1. Go to the Hierarchy panel
  2. Add or select a 2D object and locate its components in the Inspector panel
  3. Click Add component
  4. Go to 2D Physics
  5. Select Distance Joint 2D
add distance joint

Properties

properties
PropertyDescription
Connected BodySpecifies the other Rigid Body component that the distance joint should be connected to
AnchorThe position of the hinge joint in world space
Connected AnchorThe position in space of the connected body where it should be anchored to the hinge joint
Breaking ForceThe maximum force that the joint can sustain before breaking, when Breakable is turned on