O'Reilly logo

Unity 3D Game Development by Example by Ryan Henson Creighton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. Click 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required