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. Navigate to Component | Physics | Box Collider in the menu.
  3. In the Inspector panel, update the Size and Center settings for your new Box Collider with these values:
    • Center: -1, 8, 1
    • Size: 5, 16, 10
    Time for action – collision-enable the character

Just like we did with the bomb, we'll forego using a computationally complex Mesh Collider in favor of a rough-hewn primitive. We've made a big, ugly green ...

Get Unity 4.x Game Development by Example Beginner's Guide 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.