Godot Version
4.4.1
Question
So, I have a 2D “platformer” with layered tiles. the pink ones have one way collision meaning you can get on them from below and the blue ones are impassable.
I’ve been trying to program the way to get from above to below the pink tiles for a bit now and i cant figure it out. I tried disabling collisions to phase through when down + jump is pressed but that got the player stuck in the collisions. Any help?
And no, this is not tile based movement!
Maybe put the different types of tiles on different collision layers?
that could work but if i have a mountain it would be too many collision layers 
I got a working proto just by :
- activating
one_way_collision
property on the CollisionShape2D of the platform
- forcing the position to be one pixel down (
position.y += 1
) if player is on a floor and presses down key
Notice that a little red arrow will appear on the collision shape, indicating the “way” of the one way collision :
If you want to phase through multiple platforms during the same fall, you will probably have to do collision layers shenanigans (having one collision layer for “fall-through” platform could be enough). Otherwise, if you just just to fall through one, my prototype solution could be fine for your use case.
Your character isn’t infinitely tall. You could cycle the layers vertically like a layer cake:
11111111111
22222222222
33333333333
44444444444
11111111111
22222222222
33333333333
44444444444