How do I turn the gamepad-analog stick on y-axis >0 into a triggered event, so that it only alters the variable once if true.
In the main menu I want to change a variable value (menu selection) by using the analog stick on a gamepad.
Problem right now: when analog stick is down or up, the variable does not get triggered once, but every tick.
The problem I have is that the analoge stick condition depends on if the y-orientation is in a certain value. This results in a on/off condition for multiple ticks.
I do not have this problem with keyboard as input, because I can select "on pressed", which is a triggered condition.
What is a good simple practise to implement my own on trigger mechanism?
Should I make a local "trigger" variable that switches on if the analog stick moves up or down? (the trigger will then prevent the condition to run several ticks)