Slider

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 by default, you need to constraint it to its current location.
    In the Modify panel >> Physics tab >> Constraint section, click the Add Constraint button.

    The Add Constraint panel displays.
  4. Drag and drop the Slider template onto the dynamic rigid body.
  5. Make sure the constraint is selected.
  6. In the Modify >> Constraint section, you can connect the constraint to the cabinet by clicking the Pick Target or World buttons. Please refer to the Setting Connection Relationship section for more information.
  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 constraints and the targets are also duplicated.
  9. Tilt the cabinet and the drawers will open automatically. But they stop at the specified distance instead of dropping on the floor.