Side "collision" on one way platforms on tiles.

I have a tile map with the following components:
-Tilemap
-Tilemap renderer
-Tilemap collider 2d (Used by effector ON)
-Platform Effector 2d (Use one way ON, Surface Arc=1, Side Arc=0.

In my scene I have a platform made with those tiles.

I also have a player Object with a Boxcollider2d. This player can run left and right and falls because of gravity. The player is standing over the platform. When I press play, the player falls onto the platform. If I debug.log a collisionEnter2d, it returns that the player and the platform have touched. So far so good.

When the player runs to the ledge of the platform (lets say the right ledge), he starts falling. A debug.log a collisionExit2d retuns that the player and platform no longer collide. So far so good.

Now, If I immediately move to the left just after starting falling, so that the player moves down and left and “goes through” the side of the tile, a debug.log returns that the player and platform collide, even though there is no visible collision between the two! Why does this happen? Is there a way to prevent that “collision” from happening?

No, your code returns the fact that you had a collision script callback in this instance because there is a contact with the platform but the PlatformEffector2D has disabled the contact so there’s no collision response. You can verify the fact that a contact has been disabled using: Collision2D.enabled.

In short, when a contact is disabled, this flag shows that. If you want to ignore disabled contacts then use this to determine that.

Note that you can also check this per-contact although that’s fairly specialized usage: ContactPoint2D.enabled.

Thank you!