This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
Adjust velocity mid-jump? #779
Unanswered
joshuacurtiss
asked this question in
Q&A
Replies: 1 comment 2 replies
-
kaboom itself doesn't seem to have this functionality, so I implemented it by modifying the kaboom source code and adding the following function to the body component.
When the jump button is released, trigger this function to end the jump early. Regarding the other scenario, which I haven't implemented yet, it might be possible to use a similar approach. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! Playing with v3000.
You know how some games including Mario have the classic feature where pushing jump will do a normal jump but if you push and hold on the jump button you'll get a slightly bigger jump. I'm trying to implement that in Kaboom and having trouble. I figured I could have the jump force be for a normal jump but if the user continues to push the jump button, keep on adding a little extra to velocity y while they're still actively jumping.
A crude example:
Another situation is if you wanted to have the behavior where the player stomps down while in mid-air, effectively changing the upward velocity to suddenly be a downward velocity.
Is there any way to handle this in v3000?
Josh
Beta Was this translation helpful? Give feedback.
All reactions