UE4 have 2 type of input system for controllers analog. one is for example (Gamepad Left Thumbstick Y-axis) which capture the Y axis of Thumbstick and the other one is (Gamepad Left Thumbstick Up (for example) ) which trigger one time for press when thumbstick go up more than 0.0 of X axis and for released it will fire again when reach 0.0. I want to create something that if you move the thumbstick up it will fire one time then hold it in that position then move a bit up again it fire again (with a little delta). how is it possible to do that?
by “press” and “release” i mean default input events
you could use the math function “Division (whole and remainder)” Division (whole and remainder) | Unreal Engine Documentation
Use your Axis as Dividend and the step size you want as the Divisor input.
So you have for example a half way pushed axis value of 0.5 (Dividend) and setup for an execution every 0.2 (Divisor) increase, you would get the integer return value of 2. Now you need a variable in wich you have your old integer value saved. You can use the difference between the saved and the new integer value on a for loop with the start index on 1. If it doesn’t increase the for loop shouldn’t execute since it’s start index is higher than it’s end index.
edit: my description isn’t really detailed, here is a pic of what I meant
Thank you very much it works like a charm.
btw. you can accept it as answer with the green check mark below the voting counter