Game Development Reference
In-Depth Information
Getting curvy
As a nice last touch, let's clean up the running of the animation to be a bit smoother. At
present, the hero jerks up and down with the frames it has, but we can improve this by us-
ing the
Curves
features of the
Animation
editor.
To do this, let's make some space in the
Animation
window's timeline to add a few extra
frames by performing the following steps:
1. Move the last keyframe back from
0.02
to
0.04
.
2. Drag the
01_3
sprite again onto the timeline at
0.02
and
0.03
.
Note
You should now have five frames in the animation.
3. Set the
Position.y
property from
0.01
to
0.05
.
4. Set the
Position.y
property from
0.02
to
0.1
.
5. Set the
Position.y
property from
0.03
to
0.05
.
6. Click on the
Curves
button at the bottom of the Animator window to switch
between the views.
With extra frames and settings, you should now see the curve as shown in the following
screenshot: