Why is my Player slowing down between two Tilemap Colliders?

Hi Guys,

I am currently working on a 2D sidescrolling action game - I’ve come pretty far, but i am currently stuck at a strange problem. When the player crouches I am changing from a Box-Collider2D (the size of the Player) to a certainly smaller Circle-Collider2D (the size of the Head). I am doing this change so the player can move on narrow paths that normally are too low. (I’ve provided a screenshot below)
Now heres the actual problem with that: Somehow i am colliding with a collider (i am asuming the tilemap collider), which makes the player slow down. - but why?

I’ve already added a PhysicsMaterial with Friction = 0 to both colliders of the player. I am moving the player based on calcuating the velocity trough keyboard input and then applying that velocity to the rigidBody of the player with Vector3.SmoothDamp. With no Tilemap-Collider above the player everything works fine, so i dont see where the problem is.

Does somebody have an ideo what the problem is or what I am doing wrong? :smiley:

Thanks in advance!


Lessons learned: Never ever use two colliders on the same objects and use Collider2D.enabled to switch between them - instead create a new Collider each time with AddComponent and change the values of the collider.