From BlenderWiki
Moving Objects on a Path
To make objects move along a path is a very common animation need. Think of a complex camera traveling, a train on his rails – and most other vehicles can also use “invisible” tracks! –, the links of a bicycle chain, etc. All these movements could obviously be done with standard Ipo curves, but this would be a nightmare! It’s much more easy and intuitive to define a path materializing the desired movement, and make your object(s) follow it.
Blender features you two different constraints to make an object follow a path, which have different ways to determine/animate the position of their owner along their path.
In Blender, any curve object can become a path. A curve becomes a path when its CurvePath button is enabled in the Curve and Surface panel of the Editing context (F9), but you don’t even have to bother about this: once a curve is selected as target for a “path” constraint, it automatically is enabled.
You can also directly add a “path” from the Add » Curve » Path menu entry (in a 3D view). This will insert in your scene a three-dimensional NURBS curve. This is an important point: by default, Blender’s curve are bidimensional, i.e. are laid on a plane, which is often not the desired behavior of a path. To turn a standard curve three-dimensional, enable its 3D button, in the same Curve and Surface editing panel.
One last curve property that is important for a path is its direction, which is, for three-dimensional ones, materialized by its small arrows. You can switch it with the Curve » Segments » Switch Direction menu entry (or W2 NumPad).
For more on editing path/curves, see the modeling chapter.
Shapes on Curves
If you would rather like to have your object’s shape follow a path (like e.g. a sheet of paper inside a printer), you should use the Curve modifier – see these pages.
|
The Follow Path Constraint
The Follow Path constraint implements the most “classical” technique. By default, the owner object will walk the whole path only once, starting at frame one, and over 100 frames. You can set a different starting frame in the Offset field of the constraint panel, and change the length (in frames) of the path using its PathLen property (Curve and Surface panel).
But you can have a much more precise control over your object’s movement along its path by defining a Speed Ipo curve (Path Ipo type) to this path. This curve maps the current frame to a position along the path, from 0.0 (start point) to 1.0 (end point).
For more details and examples, see the Follow Path constraint page.
Legacy Method
(Very) old versions of Blender (2.37 and older) did not have constraints to make an object follow a path. They used a different method (deprecated, but still available), based on parenting, which you can find here if you are interested (are you doing any archeological research?).
The Clamp To Constraint
The Clamp To constraint implements a more advanced technique. To determine where along the path should lay its owner, its uses the location of this owner along a given axis. So to animate the movement of your owner along its target path, you have to animate some way (Ipo curves or other indirect animation) its location.
This implies that here, the length of the path have no more any effect – and that by default, the object is static somewhere on the path!
For more details and examples, see the Clamp To constraint page.