Disable double jump

Hi you passionate bunch of people!

I am still fairly new to Unreal Engine and have run into an issue following this guide (https://www.youtube.com/watch?v=V0f6DwB78l8) to set up a simple sphere control. With the jump function I run into the issue of being able to press space continously and then “fly” with the sphere.

Someone in the comments of the video suggested adding a Do Once node before the Impulse, which I did … just to have my sphere jump once now and then disable the possibilty of jumping.

Where have I effed up my blueprint? And is there a way to reset this when the character has landed on the ground again?

Thanks a lot!

Best regards
Christian

Triggered fires every frame. Use Started if you want a single action. You may need more force, though. Or tick Vel Change on the Add Impulse node.

And is there a way to reset this when the character has landed on the ground again?

You may still want this; there is, indeed OnLanded event that could reset the DoOnce.


And is there a way to reset this when the character has landed on the ground again?

Btw, the character class already has Jump functionality. Are you actually using a character class, though? We see you attempt to bounce a ball.

One simple way is to check for detection is to detect based on event hit and “storing” a jump. When the player hits the ground it is activated back to true.

image

Triggered fires every frame. Use Started if you want a single action. You may need more force, though. Or tick Vel Change on the Add Impulse node.

This didn’t help unfortunately.

You may still want this; there is, indeed OnLanded event that could reset the DoOnce .

I am not getting any OnLanded events when looking through the nodes.

Btw, the character class already has Jump functionality. Are you actually using a character class, though? We see you attempt to bounce a ball.

Yes, I am farily sure I am using a character class. I followed the video I linked to.

It’s probably just me being too new at this, but I can’t get this to work either.

I don’t know where the Jump Detection is set up.

I can do Event Hit, Branch an in my Target pin on the Add Impulse node it is already connected, so I am unsure where Sphere Collision differs from just the Ball.

I might have to find a completely new tutorial instead :smiley:

What does it say in the upper right corner, parent class? Besides that, a character class is not a great choice if you want a jumping ball that you propel with physical impulses.

Consider explaining what the end goal is.

Jump detection is just a boolean.

Using the “Started” execution pin should do the trick. It would only fire it once when the input is received. Though you might want to change the way how the jump is handled. If you’re using a character blueprint you should have a simple jump functionality built into it.

Giving it an impulse seems quite uncontrollable for a character. You should get a close result with the jump functionality.

Think most of the issue here was the guy who made the video Frankensteined the solution. Went back and just started from a blank project and it worked without any issues.

Thank you!

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