My jetpack blueprint only works when the character jumps from jog and I wish it to also work from an idle jump. Furthermore the character will not lose Fuel unless I jump from jog.
If the player is idling and jumps they need to press jump a second time to get the jetpack function to apply force. I wish to press spacebar only once than needing to be jogging first.
Continually when I increase the jump velocity above 400 I can press spacebar twice and it works. However the instant the character gets near the ground the character “glues” himself to the ground and the Add Force and the Fuel loss does not happen. I need the Fuel loss and Add Force to happen regardless if the character is grounded.
I have tried having only one InputActionJump event but it makes no difference.
I discovered and solved the problem but I could not uncover the reason.
Answer: Create a new boolean and use it to replace the “Jump Button Down” boolean within the script that Adds Force to character movement (picture 2)
Reason: The boolean “Jump Button Down” is the problem. Somewhere in the code the “Jump Button Down” is switched to False even though the keybind is never released. I think it’s due to the functions located in picture 1 named Jump and Stop Jumping. If these functions are removed the character does not jump hence they should remain. By creating a new boolean to dictate if the jetpack is available (true) or not available (false) solved my issue with Jump Button Down. Simply within picture 2 replace the Jump Button Down booleans with the new boolean.