How to Add a 2D Collider to Sprites in Unity
By Leila Mikhaleva · Game Designer · Digital ArtistAdding collision to sprites is fundamental for 2D game development in Unity — without a collider, a sprite has no physical boundary, so the player walks straight through it. This step-by-step guide is the Inspector flow in five clicks.
Once the collider is in place, the next thing that tends to go sideways is the player sticking to the collider edges. The fix lives in How to Get Rid of Sticky Walls in Unity.
Select Your Sprite
Click on the sprite you want to give a collider. The Inspector panel on the right side displays all available settings for that object.
![]()
Add the Collider Component
In the Inspector, find Add Component. Navigate to Physics 2D and select Box Collider 2D — or any other collider that matches your sprite shape.


Adjust the Collider
A green boundary box now appears around your sprite. To refine the boundary, click Edit Collider within the Box Collider 2D component settings. Small adjustment handles appear — drag them to customize the collider’s shape and size.


Result
With a collider in place, your object now has a physical boundary. The player (or other physics objects) can’t pass through it.

Related Posts
- 1Maya Basics — a Five-Minute TourCookbook · A short tour of the Autodesk Maya interface — workspace, viewport navigation, primitive shapes, modeling tools, and the channel box. For first-timers.
- 2How to Color in Corel PainterCookbook · The Corel Painter colour picker in one tour — open the palette, the detailed mixer, the eyedropper, and how to build a custom palette from scratch.
- 3How to Get Rid of Sticky Walls in UnityCookbook · The quick fix for characters sticking to walls in 2D Unity — create a Physics Material 2D with zero friction and apply it to your player's Rigidbody 2D.
- 4How to Add an Icon for a Game in UnityCookbook · The shortest path to setting a game icon in Unity — File → Build Settings → Player Settings — plus fixes for the two mini-problems you'll run into.
Random Posts
- 1How to Color in ProcreateCookbook · The tools I reach for when picking and applying color in Procreate — eyedropper, ColorDrop, and a tour of the Disc, Classic, Value, and Palettes modes.
- 2How to Add an Icon for a Game in UnityCookbook · The shortest path to setting a game icon in Unity — File → Build Settings → Player Settings — plus fixes for the two mini-problems you'll run into.
- 3How to Color in Corel PainterCookbook · The Corel Painter colour picker in one tour — open the palette, the detailed mixer, the eyedropper, and how to build a custom palette from scratch.
- 4How to Use Brushes in PhotoshopCookbook · Where to find the Brush Panel, why Brush Settings matter, and how to load custom ABR brush sets — the three Photoshop brush moves every painter sets up first.