Player gets stuck on wall | Unity2D

Viewed 889

I am working on a infinite runner game for android using Unity. The player runs (automatically) and has to avoid the obstacles by touching the screen and changing the gravity. But i sometimes when he hits the corner/side of the platform, the player gets stuck. I already applied a "noFriction" material on the player but it still happens sometimes. (The small boxcollider under the player just checks if the player is touching the ground)

Here some pictures: enter image description here enter image description here

1 Answers

You could add a Physics Material, that has it's Friction and Bounciness set to 0. Resulting in making you slide of platforms if you just hit them from the side.

Physics Material

You should also make sure to set RigidBody2D Collison Detection to Continuous.

Related