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 - add physics to your game

Let's tap into Unity's built-in physics engine by adding a Rigidbody component to the Ball.

  1. Select the Ball in the Hierarchy panel.
  2. In the menu, choose Component | Physics | Rigidbody.
  3. A Rigidbody component is added to the Ball. You can see it in the list of the components of the Ball Game Object in the Inspector panel.
  4. Make sure that the Rigidbody component's Use Gravity checkbox is checked in the Inspector panel.
  5. Press Play to test your game.
  6. Press Play again when you've recovered from how awesome that was.
Time for action - add physics to your game

No way! When you tested your game, you should have seen your Ball plummet straight down and land ...

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