O'Reilly logo

Apple Motion 5 Cookbook by Nick Harauz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Edge Collision and Gravity behaviors to a ball

Combining simulation behaviors can create some complex animation. Let's take a look at how we can make a ball bounce around our Canvas.

How to do it...

  1. Double-click to open the 03_05 project.
  2. Press the Space bar to start the playback. This project consists of a 3D ball being tossed across the screen using the Throw behavior. Click on the disclosure triangle for the group to reveal its content. You can see the behavior along with the filters used to colorize the object. Let's add a little gravity to the ball so that it falls down.
  3. Go to the gear icon just under the Canvas and choose Gravity from under Simulations. The Throw behavior is affected by gravity and the ball now falls down.
  4. Press the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required