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

Quick Fix for issue #283 #299

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Quick Fix for issue #283 #299

merged 1 commit into from
Sep 30, 2024

Conversation

niefia
Copy link
Collaborator

@niefia niefia commented Sep 30, 2024

Quick Fix for issue #283. Explanation posted there

Figured the cause and and a quick fix for this:

Cause is this line (554) not being able to run head.position.y = lerp(head.position.y, CROUCHING_DEPTH, delta * LERP_SPEED)
So because movement is being paused, it's causing that line to no longer apply, which is why the player is slowly moving back up.
It's nothing to do with the standing up code which is why it was hard to track down, its just the crouch code not being run.

For a quick fix can remove !is_movement_paused from this line (542): if crouched_jump or (not jumped_from_slide and is_on_floor() and try_crouch and !is_movement_paused or crouch_raycast.is_colliding()):

Copy link
Owner

@Phazorknight Phazorknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this! Yeah this behavior was hard to pin down.

@Phazorknight Phazorknight merged commit 0af150b into Phazorknight:main Sep 30, 2024
1 check passed
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.

2 participants