How to Get Rid of Sticky Walls in Unity
By Leila Mikhaleva · Game Designer · Digital Artist
Solution Overview
A common issue in 2D Unity game development: characters unintentionally adhere to wall surfaces during gameplay. Here’s the quick fix — a Physics Material 2D with zero friction, dragged onto the player Rigidbody 2D.
Hitting this before you’ve even given your sprite collision geometry? Start with Adding a 2D Collider to Sprites in Unity, then come back.

Step-by-Step Instructions
Step 1: Create Physics Material 2D
Right-click on the Assets section (or in any folder) and navigate to Create → 2D → Physics Material 2D.

Step 2: Configure Friction Settings
Name your new material — the example uses slide. In the right panel, find the Friction value and set it to 0.


Step 3: Apply Material to Player
Select your player character and find its Rigidbody 2D component. Locate the Material field and drag your newly created Physics Material 2D into it.


Step 4: Test
And it’s done. Your character should no longer stick to walls when you run the game.

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 Add a 2D Collider to Sprites in UnityCookbook · How to add and adjust a 2D collider on a sprite in Unity so it can actually collide with the world. The Inspector flow, in five clicks.
- 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 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.
- 2How 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.
- 3Maya 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.
- 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.