Time for action – open the pod bay door, Hal

I don't know about you, but I'm about ready to drop some bombs on this chump. We could do what we've done before and add a Rigidbody Collider Component to the bomb, as we did with the ball/heart in the keep-up game, and let Unity's physics take care of the rest. But in this case, we might like a little more control over the velocity of the bombs. So let's add Rigidbody and Collider Components to the bomb, but exclude it from Unity's gravity calculations.

  1. In the Project panel, click on the Bomb Prefab.
  2. Navigate to Component | Physics | Rigidbody. You should see the new Rigidbody Component appear in the Inspector panel.
  3. In the Inspector panel, uncheck the Use Gravity checkbox. This will exempt the bomb from ...

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.