virtual-joystick-android
virtual-joystick-android copied to clipboard
It is possible to have strength > 100
When the user touches the joystick without dragging it to the maximum possible value or more, the strength obtained in the OnMoveListener can be greater than 100.
I think it's probably when the touch point is farther from the joystick center than the maximum value of the button center. Tested with a single axis and version 1.10.1.
Sorry if it's not clear or if my english is bad.
I have noticed this issue also - if I get time I might look at doing a pull request to fix it as I assume it's a bug.
That said I just simply wrote a couple of if statements to protect against it like:
if (output > 100)
output = 100
if (output < 0)
output = 0