Chapter 5. The Secret Ingredient Is a Dash of Physics
"Sprinkles may seem soft, but they are an excellent sharp weapon against sweet-tooth pandas, who are trying to steal your delicious cake!"
This chapter explains how Unity deals with 2D physics and provides descriptions for each of the components, along with useful examples of usages. Although we will use just a small portion of the Physics engine of Unity for our game, in this chapter you can find some foundations of physics to better face the topics covered, and a full insight of 2D physics in Unity.
In the first part of the chapter, we will acquire some basic notions about physics so as to better face the topics to come. We will learn about mass, forces, and torques, just enough to understand physics in Unity.
Then, most of the chapter will focus on explaining, bit by bit, the 2D Physics engine of Unity along with all its components and functionalities. Many examples will be provided in order to facilitate the learning...