Attempting to make an "IsJumping" condition with the Input System

Hi,

It’s great to see that you are challenging yourself. :slight_smile:

Have you already tried to add Debug.Logs to your code to see what is going on during runtime?

Given you set up the “Jump” action correctly, OnJump gets called only if you press the “correct” key. This means that the code inside the method code block gets executed only if your key was pressed down.

According to your logic, the “IsJumping” bool gets set to false if the key was pressed down and if the player is not touching the “Ground”. That’s a very specific case.


See also: