Colliders and rigidbody physics

Until now, we were avoiding the discussion of physics, but our game has been using the Unity physics engine ever since we added a character to the scene. The Unity physics engine comes in two parts: one for 2D, and the more complex 3D. A physics engine is what brings life to a game and makes the game environment more natural. Developers can then leverage this engine to quickly and easily add new objects to the world that automatically react naturally. Since we already have a good working example of a game object using the physics engine, we will take a look at that:

  1. In Unity, make sure that the Map scene is loaded.
  2. In the Hierarchy window, expand the MapScene object. Then, select the Player object. Double-click on ...

Get Augmented Reality Game Development 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.