Working with Simulations Behaviors


You just created a professional-looking project from scratch using many different Basic Motion behaviors. Now let's have a little fun experimenting with a few of the Simulations behaviors.

The Simulations behaviors simulate movement based on laws of physics and geometry. Fortunately, you don't have to be a scientist or math whiz to apply them. All you need is Motion, a mouse, and a little imagination.

1.

Press the spacebar to play the 4-6 Simulations project in the Canvas.

Not very exciting, is it? In fact, all you have is a static AquaBall object on an empty background. The AquaBall comes from the Motion contents in the Library.

In the real world, a ball or bubble or any object on Earth cannot hover in the air because of the law of gravity. Gravity pulls all objects toward the ground. Let's apply the Gravity behavior to the AquaBall to see what happens.

Since you'll be applying some new behaviors, you should select the behaviors in the Library so that you can preview each behavior before you apply it.

2.

Press Cmd-2 to open the Library tab in the Utility window.

3.

Select Behaviors and then the Simulations subfolder to view the Simulations behaviors in the File Browser.

4.

Click the Gravity behavior to select it.

The selected behavior is demonstrated in the Preview area, accompanied by a brief description.

5.

In the Canvas, click the AquaBall to select it.

6.

In the Preview area of the Library, click the Apply button to apply the selected behavior to the selected object.

The Gravity behavior pulls the AquaBall off the screen.

You can adjust the acceleration of the gravity in the Dashboard.

7.

Press D to open the Dashboard, if it's not already open.

8.

In the Gravity Dashboard, drag the Acceleration slider to the right until the amount is 50.

The AquaBall falls faster.

Applying a Throw Behavior

Currently, the AquaBall drops straight down. That's okay. But what happens if you add the Throw behavior? Normally, the Throw behavior makes an object move in a straight line. With Gravity and Throw behaviors combined, the object will still attempt to move in one direction, but the movement will be affected by gravity, creating an arc.

1.

Click the Add Behavior button in the toolbar and select Throw from the Basic Motion category.

2.

In the Throw Dashboard, drag an arrow toward the upper right so the AquaBall moves upward in an arcing movement and then falls off the bottom of the frame.

Adding an Edge Collision Behavior

The AquaBall has come to life, but it would be a lot more fun if it bounced around the frame. In Lesson 2, you added an Edge Collision behavior to the yellow circle to make it bounce off the frame. Let's add an Edge Collision behavior to the AquaBall to make it bounce around the frame in this project.

1.

Drag the Edge Collision behavior from the Library to the AquaBall in the Canvas.

The AquaBall bounces off the bottom of the frame.

2.

Experiment with different behaviors in the Dashboard to create your own unique bouncing AquaBall effect.

3.

Choose File > Save As and save your Simulations project in the My Motion Projects folder on the Desktop.

4.

Choose File > Close when you are finished with the project.



    Apple Pro Training Series Getting Started with Motion
    Apple Pro Training Series: Getting Started With Motion
    ISBN: 0321305337
    EAN: 2147483647
    Year: 2005
    Pages: 283
    Authors: Mary Plummer

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net