
Right-click with your mouse cursor on the assets section or in any other folder and navigate to “Create. ” Then select “2D,” followed by “Physics Material 2D.”

Name it however you want, for example, “slide.” On the right panel, set the “Friction” value to 0.


Next, select your player. In the Rigidbody 2D component, you’ll find a field labelled “Material.” Drag the Physics Material 2D you just created into that field.


And it’s done! Your character should no longer stick to walls when you run the game.
