I am working on vertical moving platforms which are
KinematicBody2Ds with rectangular
CollisionShape2Ds. The collision shapes have
one_way_collision = true and a snap threshold of 1 pixel.
I move the platforms with a
Tween, and both the tween and the
Sometimes when my player lands on platforms that are moving upwards, he lands briefly before falling through the platform on the next frame.
I think what happens is that the player lands on the platform (changing his state to idle) and in the same frame the platform is moved a few pixels up, which puts the bottom of the player below the top of the platform causing the player to fall.
It only happens periodically when jumping onto the platforms, and happens when the player has very low y-velocity.
I though syncing everything to physics would avoid this, but it still happens periodically.
What gives, and is there a way to avoid this?
Ideally, I don't want to increase the collision shape's snap threshold, since I don't like the feeling of snapping up one-ways.
My player is a
KinematicBody2D and I move him with