All documentation / All help / 2D physics, joints and instruments

Slider

Lets a body slide along one line and forbids everything else: a piston, a lift, a box on a rail.

How to add

Use the Joint tool (J), then set type Slider in the properties.

Properties

Bodies A and B
The moving body and the support. The support may be empty: the rail is then fixed to the world.
A x, A y and B x, B y
Attachment point position.

Tips

  • The direction of motion follows the placement of the attachment points.
  • Add stops made of static shapes so the body does not slide away forever.

More in this section