Motion's simulation behaviors allow for many kinds of interaction between objects. With a simple drag-and-drop, you can create entire orbital systems affected by wind, gravity and drag, all without a single keyframe. What it doesn't allow for, unfortunately, is collision between objects.

But there's a way to fake it.

Please note that the movies in this tutorial require Quicktime 7 to view.

Let's start with a simple example, and then we'll lead up to something a bit more fun. We'll begin by creating two circle shapes: one to hit, and one to be hit.

Create the shapes

  1. Select the circle tool from the toolbar or press the 'C' key.
  2. Draw a small circle in the Canvas, about the size shown:
  3. Press the Tab key to exiting the shape drawing mode.
  4. With the shape selected, press Cmd+D to duplicate it (or go to Edit->Duplicate).
  5. Drag the duplicate shape to the right, and line it up, vertically, with the first shape.
  6. Re-select the first shape, press 'D' to bring up the Dashboard, right-click on the Fill color well and pick a new color. I chose a bright red.

We'll put a Throw behavior on the red shape to make it fly at the white shape.

Add the Throw behavior

  1. Select the red shape object.
  2. From the 'Add Behavior' menu in the toolbar, choose Basic Motion->Throw.
  3. Press the 'D' key to invoke the Dashboard. Adjust the Throw's Zoom and arrow to something like this:

If you press play, you should see the red shape go flying through the white one. It's time to fake our collision. How do we do it? With the Repel From behavior.

While we can't actually make the shapes rigidly collide with each other, we can set the Repel From behavior so that the white shape will be strongly pushed away when the red shape comes to touch it.

Add the Repel From behavior

  1. Move the playhead to frame 1.
  2. Select the white shape object.
  3. From the 'Add Behavior' menu in the toolbar, choose Simulation->Repel From.
  4. View the Behaviors tab of the Inspector.
  5. Open the Layers List and drag-and-drop the red shape into the Object image well in the Inspector.

With that simple step of drag-and-drop, we've told the white shape to be repelled by the red shape. Let's play back our project and see what we've got.

With the default settings, our results don't look too good. The red shape starts repelling the white one from too far away. We need to set the behavior so that the white shape isn't repelled until the red one is just about to touch it. Keep in mind that the numbers used here will vary, depending on the size of the shapes and the speed they're traveling.

Adjust the behavior

  1. Select the white shape and view the Behaviors tab in the Inspector.
  2. Set the Strength value to 50.
  3. Set the Influence value to 80.

Let's check that playback again:

Better. The white shape doesn't move until the red shape reaches it, but the red shape should stop moving (or change direction) as it transfers kinetic energy to the white one. The easiest way to do this is by adjusting the outpoint of the Throw behavior.

Trim the Throw behavior

  1. In the Layers List, select the Throw behavior on the red shape.
  2. Move the playhead until you find the frame where the shapes just touch, as shown:
  3. Press the 'o' key to trim the behavior (or got to Mark->Mark Out).

And once again, we check our playback:

That looks pretty good, but if we were going after a realistic look, though, we'd want to have the red shape continue onwards just a little, and maybe add some drag to both shapes so that they coast to a stop. For extra credit, try doing this:

HINT: Try adding a Repel From to the red shape.

It's been fun knocking a couple of shapes together, but let's get to the cool stuff!

Page 2: Keyframe-ageddon ->