- Edited
Hey guys. I didn't see a sticky for rules or anything so hopefully this is fine.
I've been rummaging around looking for a solution to my issue of developing a variable jump height with kinematicbody in my sidescroller.
I've searched the forum, developed my own hacky workaround, found some other resources out there but for past versions of Godot, and the kinematicbody demo in Godot doesn't use variable jump height. I don't know if there's a way to get what I'm exactly looking for.
I'm a bit strict on my player controls but I may just accept it for now, to get my game done.
Below is a screenshot of what my workaround looks like. Basically once the spacebar is pressed I increment (charge) my jump_power. Minimum jump_power is 40, increment by 10, limit at 100.
Then once spacebar is released, check and apply the limit if needed, so the player doesn't superjump.
(I'm a newbie programmer)
This isn't what I want. This only jumps once I release the spacebar. I would like it to jump immediately, then stop accelerating once I release spacebar. With kinematicbody, adjusting the vel.y variable sends it upwards with some force, then physics does the rest, if im correct? Any help would be appreciated.