Challenge 1: Create keyframed animation clips

Tutorial

·

Beginner

·

+0XP

·

25 mins

·

(6)

Unity Technologies

Challenge 1: Create keyframed animation clips

In this challenge, you will create multiple keyframed animations using the Animation Window

Languages available:

1. Animate the DominoBlock

1. Open the Starter scene from the project window

2. Open the Animation window (Window > Animation > Animation) and dock it to the bottom of the editor.

3. Select the DominoBlock GameObject and in the Animation Window click the Create button to create an animation clip and attach an Animator Component to the GameObject. Name the new animation clip “DominoBlock_Slide”.

4. Click the Record button in the Animation window to enable keyframe recording mode.

5. Right-click on the Position in the DominoBlock’s Transform component and select Add Key

6. Now scrub forward to around the 2:00 mark, then move the DominoBlock GameObject forward to the edge of the central blue circle to add another keyframe.

7. Repeat the process of scrubbing forward and moving the DominoBlock except this time move it back the back edge of the central blue circle.

8. Lastly scrub forward and move the GameObject back to the starting position.

9. Click the Record button again to exit the keyframe animation mode.

10. Click the Preview button and use the playback controls to preview your work.

11. If you press Play in the scene you will now see your animation in action!

12. Follow a similar process to create a Jump animation clip. Use the animation window animation clip dropdown to create a new animation clip called “DominoBlock_Jump”.

13. Click the Record button and right-click on the Transform Position then select Add Key.

14. Scrub forward to around the 0:30 mark then move the DominoBlock up.

15. Scrub forward again and move the DominoBlock back to the starting position.

16. You can now preview your new animation clip by clicking Preview and using the playback controls.

17. Create one more animation clip to scale the DominoBlock GameObject by using the dropdown and selecting new clip and naming it “DominoBlock_Scale”.

18. Once again, click the Record button and in the GameObject’s Transform right-click on the Scale vector and select Add Key.

19. Scrub forward and scale the block up to around 2 on the X scale.

20. Scrub forward again and scale the block down to 1 on the X scale to return it to its normal size.

21. Preview your results using the preview mode and the Animation playback controls.

Complete this tutorial