It’s actually super easy to jump heigher based on the time the jump key is held — the longer you press it, the higher your character jumps. Let’s see how to control the jump strength by modifying a single variable in Unreal Engine 5.
The following is described for the Character type of Pawn.
1. Modify the JumpMaxHoldTime variable
Open up your character blueprint and search for the JumpMaxHoldTime
variable in the Details panel:
The higher the value, the longer the player can press jump key to apply the force to the character during the jump.
2. Make sure you stop applying the force
By default, your jump should already be set up the correct way, but be sure to check that you apply the StopJumping()
at some point — at a key release, for example.
Otherwise, the character will indefinitely get more force and fly into stratosphere.
And that’s it. No elaborate schemes, no tons of scripting — it’s all in the engine already. How about making a custom cursor now?
Leave a Comment