Joystick
constructor(xAxisValue: () -> Float, yAxisValue: () -> Float, buttonValue: () -> Boolean, horizontalThreshold: Float = 0.0f, verticalThreshold: Float = 0.0f, reverseVertical: Boolean = true)
Parameters
xAxisValue
the value of the x-axis to watch
yAxisValue
the value of the y-axis to watch
buttonValue
the value of the button to watch
horizontalThreshold
the amount the horizontal axis has to be moved in either direction before it is considered 'displaced'
verticalThreshold
the amount the vertical axis has to be moved in either direction before it is considered 'displaced'
reverseVertical
by default, the y-axis of Joysticks are reversed (so pushing away from you decreases the value instead of increasing. When this is true, it will automatically correct for that.