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.
-
Apply a prop (in this case, a drawer). Transform it to a desired position, size and angle.
- Set the prop as Dynamic.
-
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. -
Drag and drop the Slider template onto the dynamic rigid body.
-
Make sure the constraint is selected.Note:
Optionally transform the constraint to desired position, angle or size so that you may easily observe the constraint.
-
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.
-
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.
-
Duplicate the drawer. The constraints and the targets are also duplicated.
-
Tilt the cabinet and the drawers will open automatically. But they stop
at the specified distance instead of dropping on the floor.