In a new Maya scene, set the
Time Slider duration to 1000 frames and ensure it is set to playback at frame 1.
- Create two polygon meshes by selecting
Create >
Polygon Primitives >
Plane. When you create each plane, set the Width and Height to 5.
- Translate the meshes so that they meet along the Z axis. One way to do this is to set the
Translate X value of one mesh to 2.5 and the
Translate X value of the other to -2.5.
- Select one mesh and convert it to a passive rigid body by selecting
Bullet >
Create Passive Rigid Body. This is considered Rigid Body A.
- 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.
- Select two meshes and select
Bullet >
Create Rigid Body Constraint to create a constraint between them.
- In the
Outliner (Window >
Outliner), select the bulletRigidBodyConstraint node.
- In the
Attribute Editor, click the bulletRigidBodyConstraintShape node tab.
- 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.
- Select Rigid Body B.
- In the
Attribute Editor, click the bulletRigidBodyShape node tab.
- 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.
- To see the effects of enabling a Motor on the constraint, in the
Outliner, select the bulletRigidBodyConstraint node.
- 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.