Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | InterDan |
I want my player character to not move with the platform they’re standing on, but so far I can’t find a good solution.
I tried negating the movement in physics process with this line both after and before the
“move and slide” function:
move_and_collide(- get_floor_velocity() * delta)
And it kind of works, but if the movement of the platform puts the character over a static floor, the KinematicBody2D will register the velocity of the static floor and won’t negate the movement of the platform, effectively moving the player along with it.
Is there a way of just disabling the automatic application of “floor velocity” on “move_and_slide”? Or setting a limit of maximum “floor velocity”? (If I manually apply that limit it will dump the falling velocity and give problems with other game mechanics)
Cheers!