#import <GCControllerButtonInput.h>
◆ GCControllerButtonValueChangedHandler
Set this block if you want to be notified when the value on this button changes.
- Parameters
-
button | the element that has been modified. |
value | the value the button was set to at the time the valueChangedHandler fired. |
pressed | the pressed state of the button at the time the valueChangedHandler fired. |
◆ pressed
Buttons are mostly used in a digital sense, thus we have a recommended method for checking for pressed state instead of interpreting the value.
As a general guideline a button is pressed if the value exceeds 25%. However there may be hysterisis applied to counter noisy input values, thus incidental values around the threshold value may not trigger a change in pressed state.
◆ value
A normalized value for the input. Between 0 and 1 for button inputs. Values are saturated and thus never exceed the range of [0, 1].
◆ valueChangedHandler
The documentation for this class was generated from the following file: