|Page (1) of 1 - 01/12/06||email article||print page|
Motion Quick Tip 1: Motion PathsUsing paths and behaviors for simple animation
For this example, I'll use an arrow over a still topographical map. The arrow will start moving at the bottom of the screen, wind its way along some features seen on the map, then end at a specific point, with the direction of the arrow following the direction of movement--all without a single keyframe.
Begin by creating (or importing) an arrow object and place it at the start point of your sequence.
Now follow these steps to animate the arrow.
Creating the motion path
1. Go to your Library palette, and choose Behaviors > Basic Motion > Motion Path.
2. Drag this behavior over your arrow object in the Layers palette. This will add the behavior to the object.
3. When you do this, a red line will appear to shoot out of the object on your canvas. Grab the end point of the line and move it to the destination location on your background, like so.
If you play your sequence right now, you'll see that the object will simply move along a straight path from its start point to its end point over the duration of your sequence.
4. So now, in order to add some winding to this path, we simply need to add new points to it. To do this, hold down the Option key on your keyboard and click on the path. If you click and drag at the same time, you'll see tangent handles appear, which will allow you to add curvature to the path, rather than simple linear bends.
5. After you've created some points, drag them into position and adjust their curvature as you see fit. If you failed to add curvature to a point, you can right-click it and choose "Smooth" from the options in the contextual menu that pops up. This will add tangent handles to the point.
Continue to add more points as you need them. Note that no matter how many points you add and no matter how much you shrink or expand the length of your path, you'll still get an animation that completes itself by the end of your sequence. (If you want to increase or decrease the duration of the animation, one way is simply to lengthen or shorten the duration of your sequence. We'll look at another way in the next installment in this series.)
You're now done setting up the basic motion. Hit the Play button in the timeline, and you should see something like this.
Aligning the arrow to the direction of movement
Now we want to set up this animation so that the arrow points in the direction of its movement. And, once again, we want to do this with no keyframing. Again, no problem. Here's how that works.
1. Go back to your Library palette and choose Behaviors > Basic Motion > Snap Alignment to Motion.
2. Drag this behavior onto your shape object in the Layers palette. If necessary (as is the case with my animation), switch the axis from horizontal to vertical in the Inspector palette.
Now hit the Play button again, and here's what you should wind up with. If necessary, adjust the curvature of your points for smoother animation.
That's it. Next time around we'll loom at how to add stop points along the way. In the meantime, if you have any further questions, be sure to visit me in the Apple Motion forum at DMN Forums by clicking here.
Related Keywords:apple motion 2, motion path, animated paths, align to motion, snap alignment, behaviors
Source:Digital Media Online. All Rights Reserved