Game Development Reference
In-Depth Information
Figure 6-49. The new “curves” showing keys at 0 and 60 (1:00 second) in the Dope Sheet
This animation will be called when the object is instantiated or created, so you will give it a lead time
of 1 second before anything happens so the player can watch the pyrotechnics you will be adding in
the next chapter. Note that Unity uses 60 samples or frames per second for its native animations.
1.
Move the time indicator to frame 100 , or 1:40 on the timeline.
The current frame number can be found just above the Sample text.
2.
In the Scene view, select the Toasted Zombie and move it up about a meter.
Keys appears for a Position track at 0 and 1:40.
3.
Scrub the time indicator to time 0, and then back to 1:40 to see the animation.
4.
At 1:40, in the Inspector, set the Rotation X to 180 so the object is
upside down.
A Rotation track has been added. If you had attempted to use the gizmo to directly rotate the object
in the scene, you would have discovered that the rotation goes onto all three axes because of the
rotation being handled internally as quaternions. If you get unexpected results with rotations, try
typing the numbers into the Inspector, where they are handled as local x, y, and z rotations
[Euler rotation] instead.
5.
Now Scale the object down until the x, y, and z gizmo end markers are within
the center gizmo marker.
A Scale track has been added.
6.
Drag the time indicator back and forth to see the animation.
The animation looks okay when you drag the time indicator manually, but you need to see it at its
correct rate of speed.
7.
Click the Play button next to the red Record button in the Animation view.
The timing is sluggish.
Search WWH ::




Custom Search