Now, some of you might be thinking that you could do the previous example pretty easily, using keyframes. That's certainly true.

But this next example defies keyframing: you would go stark raving mad before you'd keyframe it.

Clean up

  1. Save your project out, if you wish to keep it.
  2. Delete everything, except for the red ball (shape).
  3. Delete any behaviors on the red ball, except for Throw.

We're going to set up our ball to bounce around the screen, ricocheting off the edges, back and forth.

Bounce the ball

  1. Move the playhead to frame 1.
  2. Position the ball near the top-left of the project area.
  3. From the 'Add Behavior' menu in the toolbar, select Simulation->Edge Collision.
  4. Press 'D' to invoke the Dashboard and keep pressing 'D' until the Throw controls appear (if you deleted the Throw, just add it again).
  5. Set the Throw's Zoom to halfway and move the arrow to Southeast (hold down shift to constrain the arrow to 45° increments):

If you play back your project, you should see the ball bouncing around.

With our bouncing ball ready, we can set it aside for a bit. Turn it off by clicking on the checkbox in the Layers List. Now we create some text.

Add the text

  1. Highlight this text and press Cmd+C to copy it, all six lines:
    Not a keyframe in sight.
    Not a keyframe in sight.
    Not a keyframe in sight.
    Not a keyframe in sight.
    Not a keyframe in sight.
    Not a keyframe in sight.
  2. In Motion, select the text tool by pressing 'T' (or click on the text tool in the toolbar).
  3. Click-drag from the top-left to the bottom-right of the Canvas to draw a paragraph text box.
  4. Press Cmd+V to paste the text into the text box.
  5. Press the Escape key to exit the text editing mode.
  6. Position the block of text so that it is centered in the Canvas.

Our text is in place, so let's turn on the red ball shape by enabling the checkbox in the Layers List. And now for our main event: the trusty Repel From behavior.

Add the behavior

  1. Move the playhead to frame 1.
  2. Select the text object and add the Repel From behavior from the 'Add Behavior' toolbar menu.
  3. In the Inspector, view the Behaviors tab, and drag the red ball shape from the Layers List and drop it into the Object image well.
  4. Set the Strength to 100.
  5. Set the Influence to 60.
  6. Set the Drag to 2.

Now play back your project:

As you can see, the behavior allows the ball to interact with each text character, individually. The 'Affect Objects' checkbox in the Inspector allows this behavior (and others) to affect the target object as a whole (the whole block of text) or as individual objects (each letter). This works the same with particles and replicator cells. Imagine the possibilities!

Here are a couple more examples of using Repel From to do dynamic stuff.

This first one is similar to what we've already done:

The second one is a bit trickier. It uses a couple of replicators, combined with the Extrude and Indent filters:

Again, no keyframes were harmed (or used) in the making of these examples. I hope this tutorial has shown you some of the variety of uses you can get out of the Repel behaviors. Have fun!

Page 1: Basic knocking ->