Jump only once

Hey all, super new to UE5.

I am trying to prevent my character from continuously jumping when holding the space bar.

For greater clarity, this jump behavior should be the same as any 3d platformer, where holding down the jump input will not trigger subsequent jumps.

I imagine the reason I cannot find an answer for this is because of the rudimentary nature of the question.

Thank you,

1 Like

Use the “Once” gate on the “input jump” event, and use the “key up” signal from the “input jump” event to “reset” the gate.

The above example uses enhanced input with “press” and “release” being two different actions, but you can bind it in other ways, too. (And the old input system generally gives you just pressed and released signals anyway.)

1 Like

Thank you for the reply,

I’m not sure how to setup the second input action you have there called “unjump”

Can you explain what this is and how it works?

EDIT: After doing some more of my own research on how the input systems work, I answered this part of my question.

For those in this thread for the answer under Input action jump, you have to add an array element under triggers for “pressed”, and under the unjump input action, an array element for “released”.

If anyone needs more information on how this works send me a message.

Thank you for the help,

Kim

2 Likes

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