I am using UE5.0.3
I’m making a game where you are a 3d ball and you have to navigate through mazes and enemies to reach the end goal. Currently, I’m developing the movement system and have reached a speed bump.
I’m trying to make a double jump ability, but it doesn’t work very well. Whenever I try to double jump, it works fine but there’s a glitch where I can hold the jump button and infinitely double jump. This is my first game ever, and here is my code so far:
I’m not sure if you are using Event Hit to determine if you are still in the air or not, but if you are not, then I see that becoming a problem as the “InAir” boolean on the first branch wouldn’t let the logic execute beyond that after the first go round. At some point you should set it to false if that is the case after it’s on the ground or whatnot.
Secondly if you’re using the “Can Double Jump” on the second branch then you should probably set it to false immediately after the branch and allow the double jump logic to occur and after it is fully complete set it back to true so you can start all over again.