Unity Rigidbody Introduction
In Unity, a Rigidbody is a component that enables an object to interact with the physics engine. It allows GameObjects to respond to gravity, forces, collisions, and other physical effects, making movement and interaction more realistic.
đ§ Key Features of Rigidbody:
Feature | Description |
---|---|
Mass | Controls how heavy the object is. Heavier objects need more force to move. |
Drag | Slows down movement over time (like air resistance). |
Angular Drag | Slows down rotational movement. |
Use Gravity | Determines whether the object is affected by gravity. |
Is Kinematic | If checked, the object is not affected by physics forces, but can still be moved via script. |
Interpolate | Smooths out movement when the object is moving fast or the frame rate is low. |
Collision Detection | Controls how collisions are detected (Discrete, Continuous, etc.). |
Sample In Practice
Step 1: Create Two 2D Sprites
- Ground: Right-click on “Main Camera” â 2D Object â Sprites â Square, then select it and change its color to yellow in the Inspector.
- Ball: Right-click on “Main Camera” â 2D Object â Sprites â Circle, then change its color to green in the Inspector.
Click the Play button. Youâll notice that the ball remains staticâit doesnât move yet.

Step 2: Add Rigidbody2D to the Ball
Select the Ball object in the Hierarchy, then click Add Component in the Inspector. Search for and add the Rigidbody2D component.
Now, when you press the Play button, the ball will fall due to gravity. but it will not stop when the ball htis to the ground.

Step 3: Add Colliders for Collision Detection
- Ground: Select the Ground object, click Add Component, and add a BoxCollider2D.
- Ball: Select the Ball object, click Add Component, and add a CircleCollider2D.
Now press Playâthe ball should fall and stop when it hits the ground, thanks to the colliders and Rigidbody2D working together.
â Why Doesn’t the Ball Bounce When It Hits the Ground?
By default, Unity’s Rigidbody2D and Collider2D components do not produce bounce effects. Bouncing (or rebound) depends on the object’s Physics Material 2D settings.
â To Make the Ball Bounce, Follow These Steps:
Step 1: Create a Physics Material 2D
- In the Project panel, right-click â
Create â 2D â Physics Material 2D
- Name it
BouncyMaterial
- In the Inspector, set the properties:
- Friction:
0
- Bounciness:
1
(you can also try values between 0.8 and 1.0)
- Friction:
Step 2: Apply the Material to the Ball’s Collider
- Select the Ball object
- Locate the CircleCollider2D component
- Drag the
BouncyMaterial
to its Material field

đ Run the Game
Now, when you press Play, the ball should bounce when it hits the ground.