Adding a collision detection component

At the end of Chapter 4Getting Started – Object Placement, we added static objects, but I guess many of us started wondering how can we make these objects interact with the player. 

In order to do this, we have to start by adding collision to the object we want to interact with; whatever interaction we are looking for, the collision must always be a component of the object. As we read before, the components in charge of the collision are the colliders, which could be the following:

  • Box collider
  • Sphere collider
  • Capsule collider
  • Mesh collider
  • Terrain collider

Now, we have to click on one of the static objects we added in the previous chapters so we can take a look at its properties:

In order to show ...

Get Hands-On Game Development without Coding 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.