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:
- Continue from the previous lesson or open car_rig_06.max.
Change the driver’s point of view:
In this procedure, you
will wire the rotation of the “driver view” camera to the steering
wheel.
- On the Display panel Hide By Category rollout,
turn off Cameras to re-display the cameras in the scene.
- In the Front viewport, select the Camera_Driver object.
This is the camera that
occupies the driver’s seat.
- 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.
- 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).
- Click Affect Pivot Only again to exit
pivot mode.
- Select the steering wheel, right-click
it, and from the menu choose Wire Parameters.
- Choose Transform Rotation (2nd) Euler XYZ Z Rotation.
- Click the Camera_Driver object
and choose Transform Rotation (2nd) Euler XYZ Y Rotation.
- On the Wiring Parameter dialog, set the
control direction from left to right so the steering wheel controls
the camera rotation.
- 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.
- In the Camera viewport, click the Camera_Birdseye
label and choose Views Camera_Driver.
- Scrub the animation to observe the wiring
effect.
As the steering wheel
rotates, the camera viewpoint swivels in the wrong direction.
- In the Wiring Parameters dialog, add
a negative operator in front of the expression, so that it reads: –Z_Rotation/10,
then click Update.
- 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.