Chapter 16: Physics Collisions and Health System

Since games try to simulate real-world behaviors, one important aspect to simulate is physics, which dictates how Objects move and how they collide with each other, such as players colliding with walls, bullets, or enemies. Physics can be difficult to control due to the myriad of reactions that can happen after a collision. So, in this chapter, we will learn how to configure this to obtain semi-accurate Physics, which will generate the desired arcade movement feeling but get collisions working – after all, sometimes, real life is not as interesting as video games.

In this chapter, we will cover the following collision concepts:

  • Configuring Physics
  • Detecting collisions
  • Moving with Physics

Get Hands-On Unity 2021 Game Development - Second 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.