We will now learn how we can control multiple animation channels of one object with different statements.
1. In Xpressionist go to the Channels tab.
2. Choose the Cube on the left and double click Pitch_X in the middle. This adds the Cubes X rotation channel to the Active Channel list.
3. So the same with the Yaw_Y and Roll_Z channel of the Cube.
4. Go to the Editor tab and type the following three statements:
Cube.Pitch_X = time;
Cube.Yaw_Y = time;
Cube.Roll_Z = time;
5. Click OK and watch the result.
The Cube now spins around all 3 axes. All three rotation channels are now controlled by the expression.
Linking channel values
Change the expression to this:
Cube.Pitch_X = time;
Cube.Yaw_Y = Cube.Pitch_X;
Cube.Roll_Z = Cube.Pitch_X;
This expression is identical to the previous one in functionality:
The first statement sets Cube.Pitch_X to the value of time.
The second statement sets Cube.Yaw_Y to the value of Cube.Pitch_X. Doing this effectively links the Cube.Yaw_Y channel to the Cube.Pitch_X channel; in this case, Cube.Yaw_Y is now also equal to time.
The third statement acts just like the second statement, setting Cube.Roll_Z to the value of the channel Cube.Pitch_X.
Linking channel values in this way is a convenient means of simplifying the number of channels you need to control when multiple channels share the same value or can be based on the same value. Now, if you wanted to change all three position channels to be twice the value of time, you would only need to change the value for Cube.Pitch_X, and the other 2 channels would be updated automatically.
|