The player (kinematic body) continues to slide down the slope after I have stopped moving it
Hello! My player, which is a kinematic body, continues to slide down the slope after I have stopped moving it. For fixing this, I applied two tactics:
- Its movement is set in such a way, that when the player is on the ground (doesn't jump), gravity is applied only when the floor angle is greater than 45 degrees.
Here is an image with the code:
This tactic slows down the sliding considerably, but doesn't stop.
- Also, I have set parameter "stop_on_slope" of the function "move_and_slide" to be true.
This tactic stops the sliding after 5 to 10 seconds. But this is not the desirable result.
I have heard that in the version 3.2 of Godot, the parameter "stop_on_slope" no longer works, but what workarounds are there for this?