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

Slope management #8

Closed
fire opened this issue Feb 9, 2021 · 3 comments
Closed

Slope management #8

fire opened this issue Feb 9, 2021 · 3 comments

Comments

@fire
Copy link

fire commented Feb 9, 2021

Can you explain how the slope handling works?

I remember that this was unsolved in Godot core.

  • Near zero deviance on slopes
  • Perfectly equal velocities on all slopes
@manglemix
Copy link
Owner

Unsolved in godot core? Could you quote that? In my opinion, the features you pointed out were not that difficult to solve

Near zero deviance on slopes means that when you walk up onto, say, a big ball, your path will barely be pushed to the side. This is done in the align_to_floor method, where the movement vector is only allowed to rotate upwards to the up vector in order to be along the floor plane.

Perfectly equal velocities on all slopes is done by rotating the linear velocity when it reaches a new floor, using the same principles above

@SaracenOne
Copy link

I think Fire is referring to some issues with the core Kinematic body implementation which have affected CharacterController implementations we've attempted, such as depenetration, specifically because wanted to automatic character step height, but it looks like you've implemented alternative approaches which aren't as affected by these issues.

Some of the issues with KinematicBody have been logged here though (godotengine/godot#45333). A couple of other users have attempted to addresses these, but so far, a formal overhaul has not been approved yet.

@manglemix
Copy link
Owner

Oh I see. I've also been trying to add automatic step height but it's quite complicated. If my code happens to be helpful I would love to explain it in detail.

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

3 participants