Summary
Every game has physics one way or the other, for movement, collision detection, or both. In this chapter, we learned how to use the Physics system for both, being aware of proper settings to make the system work properly, reacting to collisions to generate gameplay systems, and moving the Player in such a way it collides with obstacles, keeping its physically-inaccurate movement. We used these concepts to create our Player and bullet movement and make our bullets damage the Enemies, but we can reuse the knowledge to create a myriad of other possible gameplay requirements, so I suggest you play a little bit with the physics concepts seen here; you can discover a lot of interesting use cases.
In the next chapter, we will be discussing how to program the visual aspects of the game, such as effects, and make the UI react to input.