Getting started with Unity
For the ball to roll down the ramp, you need to add a component that tells it to use Unity’s physics engine:
Important: Make sure you add the RigidBody component and not the RigidBody2D component.
A RigidBody component can receive force and torque to make an object move in a realistic way. This opens the door to create behaviors such as collisions or in this case the ability to roll down a ramp. Press the Play button again to see what happens.
I know, I’ve tricked you again! The ball has mass and responds to gravity, but we haven’t told the ramp or the bucket that they need to act like a hard surface. This is done by adding a Mesh Collider component to the Ramp and Bucket:
Press the Play button again to see what happens.