8
2D Animation and Physics
Since Unity 4.6 in 2014, Unity has shipped with dedicated 2D features, and in this chapter, we will present a range of recipes that introduce the basics of 2D animation to help you understand the relationships between the different animation elements.
In Unity 2D, animations can be created in several different ways – one way is to create many images, each slightly different, which give the appearance of movement frame by frame.
A second way to create animations is by defining keyframe positions for individual parts of an object (for example, the arms, legs, feet, head, and eyes) and getting Unity to calculate all the in-between positions when the game is running:
Figure 8.1: Overview of animation in Unity
Both sources ...
Get Unity Cookbook - Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.