Slider (New for 5.1)

When you want a rigid body to move along a certain axis in a specific range of distance, you may apply a Slider constraint to the physics objects.

  1. Apply a prop (in this case, a drawer). Transform it to a desired position, size and angle.
  2. Set the prop as Dynamic.
  3. Because the Dynamic rigid body will fall infinitely by default, you need to constraint it to the cabinet. In the Object Physics Settings panel, click the button to open the Constraint Settings panel (Shortcut: Shift + F10).
  4. Click the button and select Slider constraint type from the list.
  5. In the Connection section, you may pin the drawer to the cabinet by clicking the Pick Target button and select the cabinet. Please refer to the Setting Connection Relationship section for more information.
  6. Turn on the Gizmo mode (Shortcut: Ctrl + Q) and switch to the Local Move (toggle with the 'W' key) to find the X axis to determine the correct direction.

    Adjust the direction of the pivot if needed.
  7. In the Limit section, you are able to define the distance limits for the X axis. Please refer to the Setting Constraint Limits section for more information.
  8. Duplicate the drawer. The physics settings are also duplicated, including the constraint and the target.
  9. Tilt the cabinet and the drawers will open automatically. But they stop at the specified distance instead of dropping on the floor.