PHYSICS: ASSET SETUP

Which sprites get which physics components

Course: Game On Lesson: T1-L05 Type: Companion to main tutorial
1
No New Imports Needed
Same assets from L04

Good news — this lesson uses the exact same Kenney assets you already imported in Lesson 4. You do not need to download or import anything new.

Your Sprites folder should already contain your player sprite (p1/p2/p3_front.png) and your ground/platform tiles from the previous lesson. If it does, you are ready to go.

The entire focus of Lesson 5 is adding physics components to the sprites that are already in your scene. Components are added through the Unity Inspector — no file imports required.

💡
What are Components? In Unity, a component is a piece of functionality you attach to a GameObject. Think of the sprite as the "body" and the component as its "abilities" — Rigidbody 2D gives it gravity, Collider 2D makes it solid.
2
Which Sprites Get Which Components
The physics setup cheat sheet

Not every sprite gets the same components. Here is exactly what to add to each sprite in your scene:

Your Sprite Component to Add Key Settings
Player (p1/p2/p3_front.png) Rigidbody 2D Body Type: Dynamic, Gravity Scale: 1
Player (p1/p2/p3_front.png) Capsule Collider 2D Matches character shape, rounded bottom prevents edge-catching
Each grass ground tile Box Collider 2D No Rigidbody needed — static by default
Each platform tile Box Collider 2D No Rigidbody needed
💡
Why Capsule for the player? The rounded bottom of a Capsule Collider prevents the character from catching on tile edges when walking across multiple ground tiles. This is the industry standard for humanoid characters in 2D games.
Do NOT add Rigidbody 2D to the ground tiles! If you do, they will fall when you press Play. Ground tiles are static by default — they only need a Box Collider 2D so that other objects (like the player) can land on them.

How to Add a Component

  • Click on the Player sprite in the Hierarchy to select it
  • In the Inspector panel (right side), click Add Component
  • Type "Rigidbody 2D" in the search box and click it to add
  • Click Add Component again, search for "Capsule Collider 2D" and add it
  • Now click each ground tile and add Box Collider 2D the same way
  • Press Ctrl + S to save your scene
3
Optional: Fun Physics Objects
Replace boring shapes with Kenney sprites

For the Great Fall Lab experiment, you CAN replace the boring white circles and squares from the tutorial with actual Kenney sprites. This makes your physics experiments look way better!

Suggested Kenney Sprites for Physics Objects

File Location Use For
box.png Base pack / Tiles / Crate for physics experiments
boxAlt.png Base pack / Tiles / Alternative crate look
boxExplosive.png Base pack / Tiles / Visual variety (looks explosive!)
bomb.png Base pack / Items / Round falling object (replaces white circle)
coinGold.png Base pack / Items / Round bouncing object
weight.png Base pack / Items / Heavy-looking falling object

Steps to Use a Kenney Sprite as a Physics Object

  • Instead of creating a white Circle sprite, drag bomb.png from the Project panel into the Scene
  • Rename the GameObject to "Ball" in the Inspector
  • Add Circle Collider 2D + Rigidbody 2D (Body Type: Dynamic)
  • Position it above the ground and press Play — it falls with gravity!
🌮
Experiment! Try using box.png with a Box Collider 2D + Rigidbody 2D and drop it from a height. Stack several crates and watch them tumble!
4
Physics Materials — Visual Guide
Created in Unity, applied to Kenney sprites

Physics Materials are created inside Unity (right-click in Project panel → Create → Physics Material 2D). They are NOT files from Kenney. However, they dramatically change how your Kenney sprites behave.

Recommended Physics Materials

Material Name Settings Best With
Bouncy Bounciness: 0.8, Friction: 0.3 bomb.png, coinGold.png
Ice Bounciness: 0, Friction: 0 Any ground tile (makes it slippery)
SuperBounce Bounciness: 1, Friction: 0.1 Any small object

How to Apply a Physics Material

  • Right-click in your Project panel → Create → Physics Material 2D
  • Name it (e.g. "Bouncy") and set the Bounciness and Friction values in the Inspector
  • Select the GameObject you want to apply it to (e.g. the bomb)
  • Find its Collider 2D component in the Inspector, locate the Material slot
  • Drag your Physics Material 2D from the Project panel into the Material slot
💡
Try this! Apply the "Ice" material to your grass ground tiles — the player will slide around like on ice! Great for experimenting with how friction changes gameplay feel.
Physics Material 2D vs Physics Material — Make sure you create a Physics Material 2D (not just "Physics Material"). The non-2D version is for 3D games and will not work with your 2D colliders.
5
Quick Reference: Physics Cheat Sheet
Everything you need to remember

Core Concepts

Rigidbody 2D
Makes a sprite FALL (responds to gravity)
Collider 2D
Makes a sprite SOLID (stops things from passing through)
Both Together
You need BOTH for physics to work on an object

Body Types Explained

Dynamic
Moves with gravity and forces — use for the player, falling objects, physics crates
Static
Never moves — use for ground tiles, walls, platforms (default when no Rigidbody is added)
Kinematic
Moved by code only, ignores gravity — use for moving platforms, elevators

Collider Shapes

Box Collider 2D
Rectangle shape — ground tiles, crates, platforms
Circle Collider 2D
Circle shape — bombs, coins, balls
Capsule Collider 2D
Rounded rectangle — player characters (prevents edge-catching)
PHYSICS SETUP OVERVIEW ======================== [Player Sprite] [Ground Tile] [Crate / Bomb] + Rigidbody 2D + Box Collider 2D + Rigidbody 2D (Dynamic, Gravity=1) (no Rigidbody!) (Dynamic, Gravity=1) + Capsule Collider 2D + Box or Circle Collider 2D RESULT: RESULT: RESULT: Falls, lands on Stays put, Falls, bounces, ground, can jump blocks things collides with stuff
Most Common Mistake: Adding Rigidbody 2D to the ground. If your ground falls away when you press Play, select the ground tile, find the Rigidbody 2D component, right-click it, and choose Remove Component.
Quick Test: Press Play. Your player should fall and land on the ground. If it falls through, the ground is missing its Box Collider 2D. If it does not fall at all, the player is missing its Rigidbody 2D.