2D Animation and Physics

Since Unity 4.6 in 2014, Unity has shipped with dedicated 2D features, and Unity 2021 continues to build on these. In this chapter, we will present a range of recipes that introduce the basics of 2D animation in Unity 2021 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: ...

Get Unity 2021 Cookbook - Fourth 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.