How to Make a charging Jump?

I’m trying to make a charging jump for my 2D game, and I’ve tried a lot of things on my own and I’ve tried to search stuff up but I’m unable to find anything useful.

Info that might be useful(I have no clue if it is useful. I’m very new to Unreal);

  • I’m using the Enhanced action input AI for all movement

Here’s a simple solution, when pressing the jump button you set a timer so after a second or so a charged jump can be executed if the button is released before the timer is able to run then we do a normal jump.

On release depending on the type of jump we change the Z velocity of the jump and then execute the jump. You can also check if the player is already jumping and do nothing.

I hope this helps.

1 Like

Hi, This was helpful, but is there a way to make my character jump higher the longer you hold down the jump key?

Mapping time elapsed to a certain Z velocity range, I changed the timer to 3 seconds and as a result the map range should also be mapped to 3 seconds, feel free to customize to your liking.

2 Likes

Hi, I did about exactly the same thing but it only aways use the minimum value for the jump.

Use Started instead of Trigged, the latter fires continuously as long as the key is held so the timer is being reset.

1 Like

Thank you very much, it is working properly now.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.