Apple Motion 5 Cookbook
上QQ阅读APP看书,第一时间看更新

Stop, Wriggle, Rate, and Quantize

Now that we've been introduced to our first parameter behavior in Chapter 2, Looking at Motion's Library, let's look at a few more and see what they can do.

How to do it...

  1. Open 03_06 from the exercise folder for this chapter.
  2. Press the Space bar to play back the animation. It's four arrows travelling from left to right across the screen. We're going to add a different parameter behavior to all three and see the effects. Stop the playback. Move the playhead to the 5-second mark in the mini-Timeline. In the Layers tab, select the S layer. Press the F1 key to go to the Properties tab. Ctrl + click on the word Position. Navigate to Add Parameter Behavior | Stop. Start the playback. The arrow stops dead in its tracks at 5 seconds and remains there till the end of the animation.
  3. Select the W layer. Press the F1 key to go to the Properties tab. Ctrl + click on the word Position and navigate to Add Parameter Behavior | Wriggle.
  4. Click on the Behaviors tab in the Inspector. Change the value of Amount to 50, the Apply Mode to Add and Subtract, and the Frequency to 0.5. Wriggle is very similar to the Randomize behavior as shown in the following screenshot. It wiggles the arrow on its position coordinates by adding and subtracting to its original position value. Play back the animation.
  5. Select the R layer. Press the F1 key to go to the Properties tab. Ctrl + click on the word Position and navigate to Add Parameter Behavior | Rate.
  6. Click on the Behaviors tab in the Inspector. Change the value of Rate to 20. Notice how the path the arrow travels along moves slightly quicker as well as projects upward. Press the Command + Z shortcut a few times until the Rate behavior is removed. Again, press the F1 key to go to the Properties tab. Ctrl + click on the letter X under Position and navigate to Add Parameter Behavior | Rate.
  7. Change the value of Rate to 20. Start the playback. Notice how when we only select X the rate only affects the speed of travel to the left and right.
  8. In the Layers tab, select the Q layer. Press the F1 key to go to the Properties tab. Ctrl + click on the word Position. Navigate to Add Parameter Behavior | Quantize.
  9. Click on the Behaviors tab in the Inspector. Increase the Step Size to 100. Notice that the arrow seems to jump from point to point rather than follow a smooth path of travel.
  10. Select the S layer and navigate to Object Menu | Solo. Continue this for each layer to get a sense for the animation by itself as you play back. Change the values for each parameter behavior to get a sense for how they work.

Wriggle is one of my favorite parameter behaviors.

There's a lot to the Wriggle behavior

The Wriggle behavior is great not only for making changes to position, but also for a whole lot of other parameters too. One of my favorite things to do when working in 3D is add a light to a scene and add a Wriggle behavior to the intensity value so the light appears to be flickering. Take a look in the 03_07_Bonus project in the exercise folder for this chapter. I added a Wriggle parameter behavior to the intensity and color values of Light.

See also

  • The Adding an Attractor and Attracted To behavior recipe
  • The Adding Edge Collision and Gravity behaviors to a ball recipe
  • The Creating Random Motion using the Randomize behavior recipe
  • The Using the Link behavior recipe