Hi, I have a script that needs to get a boolean value when a button is pressed in the update method. In the old input system I would do something like this:
However, on the new input system, I have to use the event that fires instead:
public void OnJump(InputValue value)
{
jump = true;
}
I understand that the logic relating to the button press can be handled in the event, but if I need to use the boolean in the update method, how can I reset the boolean for the frames where the button is not pressed?
var map = CurrentInputControl.currentActionMap; //CurrentInputControl is exposed in editor to drag in the Player Input
inputJump= map.FindAction("Jump", true);
Then in my Update, I can use the IsPressed() method which is similar to GetButton: