Examples
 
 
 

This section includes two examples of implementing aim constraints.

Aiming a sphere at a sphere

To setup the two spheres

  1. Create a NURBS sphere.
  2. Move the sphere some distance away from the center of the scene.
  3. Create another NURBS sphere. Leave it at the scene’s origin.
  4. Display the sphere’s local rotation axis (Display > Transform Display > Local Rotation Axes).

To create an aim constraint

  1. Select the you moved sphere, and then select the sphere at the origin.
  2. If you are sure that the constraint options have their default settings, select Constrain > Aim. (To be sure that you are using the defaults, select Constrain > Aim. Click Reset Settings, and then click Add.)

To use the aim constraint

  1. Select the sphere you moved (nurbsSphere1), and select the Move Tool. As you move the sphere, the other sphere (nurbsSphere2) will rotate accordingly.

Note how nurbsSphere2’s local rotation X-axis always points at the nurbsSphere1. Also, note how nurbsSphere2’s local rotation Y-axis always tries to point as closely as possible in the same direction as the scene’s Y-axis.

By default, the aim vector causes nurbsSphere2’s local rotation X-axis to point at nurbsSphere1. Also, by default, the up vector causes nurbsSphere2’s Y-axis to align itself as closely as possible with the scene’s Y-axis.

Aim a cone at a sphere

To create sphere and cone

  1. Create a NURBS sphere.
  2. Move the sphere some distance away from the scene’s origin.
  3. Create a NURBS cone.

To create an aim constraint

  1. Select the sphere, and then select the cone.
  2. Select Constrain > Aim > .
  3. Set Aim Vector to 0.0, 1.0, 0.0. (The default is 1.0, 0.0, 0.0.)
  4. Set Up Vector to 0.0, 0.0, 1.0.
  5. Set World Up Vector to 0.0, 0.0, 1.0.
  6. Click Add.
  7. Now you have constrained the cone to aim at the sphere.

To use the constraint

  1. Select the sphere, and select the Move Tool. As you move the sphere, the cone will always point at the sphere.