Reputation: 1
I started a 2d game and my character with a boxcollider gets stuck to walls (created with a tilemap so with a tilemap and composite collider)
I saw solutions to this where you have to put a physics material with no friction on the player, however if i do that it messes up other movements that use friction (such as a slide) Is there a way to fix it without physics material?
Upvotes: 0
Views: 564
Reputation: 111
You can put a physics material with low friction on walls instead of on player
or
you can write a script that when player collide with walls, push player away from wall a little bit depending on the normal of hit point.
Upvotes: 1