Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Gamepro5 |
I recorded the issue because its hard to describe. The video can be found here.
I am desperate for help, I have been struggling with this for weeks.
The code in the video can be examined further here (the relevant player code is here).
Thank you to anyone who takes the time to help me.
(This uses the most recent version of Godot: 3.2.2)
Have you attempted to use move_and_slide_with_snap() at all?
RedBlueCarrots | 2020-07-15 11:32
Of course. You can see that in the code. That is what I am currently using, not using move_and_slide_with_snap makes it not slide down a bit but instead it makes the player jump after climbing a slope.
Gamepro5 | 2020-07-15 18:48
For those still struggling with this issue. Make Gravity the last thing you calculate, I struggles with this for a long time but fixed it by simply moving the gravity calculation to the bottom. Make sure to use the is_on_floor()
signal also.
if not is_on_floor():
velocity.y -= gravity * delta
move_and_slide_with_snap worked the best for me also.
LordBoots | 2022-12-02 12:58
Holy crap thank you for this! Weird slope behavior has been giving me fits for literally months and I had no idea how to track down what was causing all the odd stuff. Calculating gravity after everything else seems to have fixed all of it.
karltha | 2023-01-14 23:49