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

Fixed character movement stuck bug #500

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kablouser
Copy link

#499

Solution: If OnControllerColliderHit occurs multiple times per frame (i.e. the CharacterController has multiple hits) then pick the hit with the highest normal.y value (i.e. pick the hits near the bottom of the capsule).

Explanation: Inside IsSlidingCondition.Statement(), the checks for step height and slope limit assumes there is only 1 hit per frame. However, if the player is standing on a flat surface and is touching a vertical wall. And, if the vertical wall's hit is last to be messaged. Then, the player could either slide directly upwards (which would unstuck the player) or downwards (which would cause the issue).

Verify: Reproduce the steps described in the issue.

@CLAassistant
Copy link

CLAassistant commented Sep 25, 2021

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

None yet

2 participants