One-way collisions not working as intended

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jack45

I’m pretty new to this engine but I have been using it for a while. A few days ago I stumbled upon a problem I dont know how to fix. In my scene I have a player (kinematicBody2D) with a square collision. I also have two tilesets. One with solid tiles and the other one with one way tiles (one way collision). What happens is that when I jump with my character he sometimes lands on the one way collision tiles, but sometimes he doesnt and just goes right through, as if the tiles had no collision at all. It is really strange.

After testing for a while I realized that my player can collide with these tiles depending on where he is located related to the tiles. To test it I placed 3 tiles in a stair diagonal patern. If my player is standing on the floor and he jumps to the first one way collision tile (odd number) he lands on it with no problem. However if he is on the floor and jumps to the second tile (even number) he just falls through it. If he jumps to the third one from the floor (odd number) he also standson top of it.

However if I start on the floor, then jump to the first tile, and the to the second one he can stand on it, without falling right through.

My conclusion is that my player can only jump and stand on one way collision tiles which are an odd number away (in the y-axis) from where he is standing on. I dont know if Im explaining it really well.

It is really weird and I dont know if anyone has an idea of what I could be doing wrong.