8
634 Chapter 12: Animation
3.
Right-click in the Rotation track to display the
Motion Capture properties dialog.
4. Click the button beside Z Rotation, and assign
aJoystickInputDevice.
5. Under Joystick Axis, choose the X option (if
it’s not already chosen).
6. Check Accumulate so that the rotation won’t
return to zero each time you release the joystick.
Ex ample: To s et up the Position controllers of a
camera for moving with a j oystick :
The rotation of the camera about its world Z axis
will be controlled by the X motion of the joystick.
You’ll set up the Position controllers of the camera
to move the camera for ward and back w ith the Y
motion of the joystick.
1. Assign a Position Motion Capture controller
to the camera’s Position track, and access its
Properties dialog.
2. Assign a Joystick Input D evice to b oth the X
P osition and Y Position buttons.
3. Click the Edit Binding X button, and then
choose the Y option under Joystick Axis.
4. Check Accumulate.
5. Click the Edit Binding Y button, and also
choose Y under Joystick Axis.
6. Check Accumulate.
The Y motion of the joystick will now affect
both the X and Y positions of the camera.
Ex ample continued: To add the increment ba sed on
direction options:
If you tested the camera motion at this point,
moving the joystick forward or backward along
the Y would produce a diagonal motion because
the Position tracks would receive equal amounts of
X and Y values. Adding the Increment Based On
Direction options will change this.
1. Click the X Edit Binding button.
2. Under Increment Based On Direction, click the
button beside Controller.
A dialog appears with a list of controllers.
3. Find and select the Rotation M otion Capture
controller for the camera.
4. SettheDirectionoptiontoZ(thelocalaxis
along which the direction points).
5. Set the Component option to X (matching the
Edit Binding button).
6. Click the Y Edit Binding button.
7. Click the button be side Controller, and assign
the Rotation Motion Capture controller.
8. SettheDirectionoptiontoZ,thensetthe
Component option to Y.
9. Open the Motion Capture utility, turn on both
tracks in the list, click the Test button, and
move the c amera while observing it in the Top
view por t.
As you move the joystick in the Y direction, the
camera moves forward or backward. Moving
the joystick in the X direc tion rotates the
camera,butthen,asyoucontinuemovingthe
joystick in the Y direction, the camer a moves
forward and back along its local axis.