Open maxsoulard opened 9 years ago
what about using current callbacks instead ? like here
It is more flexible and let the user chooses the behavior it want for the click
I am not sure to fully understand what you are saying. As you probably saw, the code I wrote allow to determine if the stick is inside or outside the joystick base circle. I am using that in my app to simulate a stick click (as on physical controllers). Maybe my pull request naming is not well chosen. Or maybe I didn't understand at all what you proposed :)
Simulates joystick click by calculating if the virtual stick position is within the canvas circle. basic example also updated to test the center position.