I try to use new input system and want to make simple feature in my game. For example, you can hold Ctrl button, accumulate power, then release button and player will be pushed with a certain force.
And I have a problem. I can get the moment when player presses the button or when hold is performed. But I don’t know how to get the moment when player releases button.
The ‘canceled’ event is fired when the button is released. However, it will happen even if they haven’t held it for the full duration of your hold interaction.
If you only want to accept the release after it’s held for the full time, you can set a flag in the ‘performed’ event and then check the flag in the ‘canceled’ event to see if they held it long enough.