Add physics to your game
Let's tap into Unity's built-in physics engine by adding a Rigidbody component to the Ball:
- Select the Ball from the Hierarchy panel.
- In the menu, navigate to Component | Physics | Rigidbody.
- 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:
- Make sure that the Rigidbody component's Use Gravity checkbox is checked in the Inspector panel.
- Press Play to test your game.
- Press Play again when you've recovered from how awesome that was.
No way! When ...
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.