Configuring physics
Unity’s physics system is prepared to cover a great range of possible gameplay applications, so properly configuring it is important to get the desired result. In this section, we will examine the following physics settings concepts:
- Setting shapes
- Physics object types
- Filtering collisions
We are going to start by learning about the different kinds of colliders that Unity offers and then learn about different ways to configure those to detect different kinds of physics reactions (collisions and triggers). Finally, we will discuss how to ignore collisions between specific objects to prevent situations such as the player’s bullets damaging the player.
Setting shapes
At the beginning of this book, we learned that objects usually have two shapes: the visual shape (which is basically the 3D mesh) and the physical one (the collider—the one that the physics system will use to calculate collisions). Remember...