GodotVR / godot-xr-tools

Support scenes for AR and VR in Godot
MIT License
504 stars 74 forks source link

Fix slope-sliding by applying ground-friction at the correct time #640

Closed Malcolmnixon closed 3 months ago

Malcolmnixon commented 4 months ago

This PR fixes #639 by applying the ground-friction at the correct time in the movement calculations. This PR also fixes #642 by only applying the steep-slope logic if the player is on the ground.

HrenEgo commented 3 months ago

ground_control = Always (If the player doesn't move after jumping, they fall slowly to the ground. However, if the player moves in any direction during the jump, everything works fine.)

ground_control = On Ground (It's okay)

Malcolmnixon commented 3 months ago

Updated how friction is applied so it's only applied horizontally in the reference frame of the ground.

HrenEgo commented 3 months ago

Everything's great. No problems. Thank you for your work!!!