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

Improving jump functionality #69

Merged
merged 6 commits into from
Feb 15, 2024
Merged

Conversation

FailSpy
Copy link
Contributor

@FailSpy FailSpy commented Feb 15, 2024

  • FEATURE: New crouch jumping toggle on the Player script (6d28627)
  • FEATURE/BUGFIX: Jump now has a cooldown timer, allowing you to still "hold" jump to jump over and over again without needing to re-press, but it won't spam it in such a way that will cause you to burn your stamina or other similar effects. The timer is currently set to half a second (27c8843)
  • FEATURE/BUGFIX: When jumping off a moving platform (i.e. is recognized by 'get_platform_velocity()'), the jump will inherit the upwards velocity of the platform as well.(27c8843)
  • BUGFIX: Jump no longer 'locks' the player unless they successfully perform a jump (6b4bc96)
  • BUGFIX: Crouch jumping now works (6d28627)

Issue resolutions:
Fixes #68: Now when you jump off the moving platform, you inherit its upwards velocity. Additionally, jumping doesn't get spammed anymore.
Fixes #59: You can now disable crouch jumping, and by changing the collider on a crouch jump, crouch jumping now works. I haven't refined it any more than that.

@Phazorknight Phazorknight merged commit d5d2258 into Phazorknight:main Feb 15, 2024
@Phazorknight
Copy link
Owner

Amazing work! Just merged it into main.
Small note: When you hold jump the player jumps repeatedly until stamina runs out. I don't mind this behaviour though. 👍🏼

@FailSpy
Copy link
Contributor Author

FailSpy commented Feb 15, 2024

Yep, I'm aware. Given that the code was using "is_pressed" I assumed that holding = jump at every opportunity as desired behavior.

Easy enough to switch to a different behaviour by using "is_just_pressed", though probably at that point want to implement a jump buffer

@FailSpy FailSpy deleted the patch-1 branch February 18, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants