Time for action - collision-enable the Character

Now that the bomb is all rigged up, we'll be able to determine through code when it hits the player character. However, the player character is missing its Collider Component too! Let's fix that.

  1. Click to select the Character Prefab in the Hierarchy panel.
  2. Click Component | Physics | Box Collider in the menu. You'll see that "Losing prefab" warning. Don't fret none just click on Add.
  3. In the Inspector panel, click on the gray arrows to expand the Size and Center settings for your new Box Collider. Update the fields with these values:
    • Size: 5, 16, 10
    • Center: -1, 8, 1
Time for action - collision-enable the Character

Just like we did with the bomb, we'll ...

Get Unity 3D Game Development by Example 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.