Use Rigid Bodies to Create a Hinge Simulation

 
 
 

In a new Maya scene, set the Time Slider duration to 1000 frames and ensure it is set to playback at frame 1.

  1. Create two polygon meshes by selecting Create > Polygon Primitives > Plane. When you create each plane, set the Width and Height to 5.
  2. Translate the meshes so that they meet along the Z axis. One way to do this is to set the X Translate value of one mesh to 2.5 and the other Translate value of one mesh to 2.5 and the other 0 -2.5.
  3. Select one mesh and convert it to a passive rigid body by selecting Bullet > Create Passive Rigid Body. This is considered Rigid Body A.
  4. Select the other mesh and convert it to a active rigid body by selecting Bullet > Create Active Rigid Body. This is considered Rigid Body B.
  5. Select two meshes and select Bullet > Create Rigid Body Constraint to create a constraint between them.
  6. In the Outliner (Window > Outliner), select the bulletRigidBodyConstraint node.
  7. In the Attribute Editor, click the bulletRigidBodyConstraintShape node tab.
  8. From the Constraint Type list, select Hinge. This creates a Hinge constraint between Rigid Body A and Rigid Body B along each object Z axis.
  9. Select Rigid Body B.
  10. In the Attribute Editor, click the bulletRigidBodyShape node tab.
  11. In the Rigid Body Properties section set Angular Damping to 0.4.

    Play back the simulation. Rigid Body B swings back and forth along it Z axis. Over time, the rigid body swings decrease until they stop at around frame 1000.

  12. To see the effects of enabling a Motor on the constraint, in the Outliner, select the bulletRigidBodyConstraint node.
  13. In the Attribute Editor, in the Motors section, turn on Angular Motor Enabled.

Play back the simulation. Rigid Body B now swings at a constant speed in 360 degree rotations due to the Angular Motor.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License