Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player slides on slopes #102

Closed
Malcolmnixon opened this issue Mar 13, 2022 · 1 comment
Closed

Player slides on slopes #102

Malcolmnixon opened this issue Mar 13, 2022 · 1 comment

Comments

@Malcolmnixon
Copy link
Collaborator

If the player stands on a slope they will slide down hill. This used to be fixable by setting stop_on_slope=true in the KinematicBody.move_and_slide call, however that has been broken since godot 3.2 so an alternative implementation will be needed.

A common approach is to detect when the player is on the ground and "skew" the gravity in the direction of the ground surface normal.

@Malcolmnixon
Copy link
Collaborator Author

Testing in demo projects shows the approach of applying gravity "normal" to the surface works quite well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant