Jump high­er on longer jump key press

It’s actu­al­ly super easy to jump heigher based on the time the jump key is held — the longer you press it, the high­er your char­ac­ter jumps. Let’s see how to con­trol the jump strength by mod­i­fy­ing a sin­gle vari­able in Unre­al Engine 5.

1. Mod­i­fy the Jump­Max­Hold­Time variable

Open up your char­ac­ter blue­print and search for the JumpMaxHoldTime vari­able in the Details panel:

The JumpMaxHoldTime variable that controls the ability to jump higher the longer you press jump button
Note that this vari­able is not a part of the Char­ac­ter Move­ment com­po­nent, it should be right on the root com­po­nent of your blueprint.

The high­er the val­ue, the longer the play­er can press jump key to apply the force to the char­ac­ter dur­ing the jump.

2. Make sure you stop apply­ing the force

By default, your jump should already be set up the cor­rect way, but be sure to check that you apply the StopJumping() at some point — at a key release, for example. 

Oth­er­wise, the char­ac­ter will indef­i­nite­ly get more force and fly into stratosphere.

And that’s it. No elab­o­rate schemes, no tons of script­ing — it’s all in the engine already. How about mak­ing a cus­tom cur­sor now?