Adjust Driver Viewpoint
 
 
 

As a driver, when you use a steering wheel to initiate a turn, your eyes tend to follow the direction of the turn. When you turn left, you look left: when you turn right, you look right. In this lesson, your final task is to make the viewpoint of the driver react to the rotation of the steering wheel.

Set up the lesson:

Change the driver’s point of view:

In this procedure, you will wire the rotation of the “driver view” camera to the steering wheel.

  1. On the Display panel Hide By Category rollout, turn off Cameras to re-display the cameras in the scene.
  2. In the Front viewport, select the Camera_Driver object.

    Camera_Driver object

    This is the camera that occupies the driver’s seat.

  3. Click the List Con button on the myTools toolbar you created earlier in the tutorial.

    The List Con script automatically adds position and rotation list controllers, permitting you to retain control over the camera’s local orientation.

    NoteIf the myTools toolbar is not currently displayed on your interface, right-click a gray area on the main toolbar and choose myTools from the menu.
  4. With the camera object selected, go to the hierarchy panel and on the Adjust Pivot rollout, click Affect Pivot Only.

    Notice that the swivel axis needed for the camera is the Y axis (displayed in green).

    Camera swivel on Y axis

  5. Click Affect Pivot Only again to exit pivot mode.
  6. Select the steering wheel, right-click it, and from the menu choose Wire Parameters.
  7. Choose Transform Rotation (2nd) Euler XYZ Z Rotation.

  8. Click the Camera_Driver object and choose Transform Rotation (2nd) Euler XYZ Y Rotation.

  9. On the Wiring Parameter dialog, set the control direction from left to right so the steering wheel controls the camera rotation.
  10. On the right-hand Expressions panel, complete the expression so it reads: Z_Rotation/10 and click Connect.

    Keep the dialog open for now.

    NoteThe /10 factor in the expression prevents the camera from rotating too far in either direction. You can experiment with different values to produce the results you need.
  11. In the Camera viewport, click the Camera_Birdseye label and choose Views Camera_Driver.
  12. Scrub the animation to observe the wiring effect.

    As the steering wheel rotates, the camera viewpoint swivels in the wrong direction.

  13. In the Wiring Parameters dialog, add a negative operator in front of the expression, so that it reads: –Z_Rotation/10, then click Update.
  14. Close the Wiring Parameters dialog and scrub the animation again.

    The rig is now complete. To view a version of the finished product, open car_rig_final.max.

Summary

In this tutorial, you learned how to assign controllers to components of a model, and use expressions to ensure the controllers animate the components correctly. You also learned how to use Point helpers to animate a model along a path and were shown how to rework the model hierarchy so that a child object can respond to the animation of its parent.