Game Development Reference
In-Depth Information
More information on animation curves can be found online in the
Unity documentation at http://docs.unity3d.com/Manual/
AnimatorCurves.html .
Camera paths - iTween
One very common feature request that, strangely, has not yet been implemented as a
native Unity feature is programmable motion paths. This refers to the ability to have
a GameObject , such as a camera, smoothly follow a path or spline using spherical
interpolation, where the path is defined by a series of connected game objects.
This feature already exists in the sense that camera motion can be defined through
prescripted animations that are created using Unity's animation editor. However,
there is a desire for more flexible and programmatic control over a motion path in
which the path is defined by a set of waypoints that can be adjusted in code over
time. This functionality is especially useful, for example, for space-shooter games
where the trajectory of enemy ships clearly follows smooth, curved flight paths that
sometimes change according to the position of the player's space ship, as shown in
the following screenshot. There are many ways to achieve this in Unity, but a quick
and easy solution is to use the freely available add-on, iTween by Bob Berkebile;
this can be downloaded and imported directly from Unity's Asset Store. More
information on iTween can be found at http://itween.pixelplacement.com/
index.php .
Creating camera motion paths with iTween
 
Search WWH ::




Custom Search