Skip to content

Simulate joystick click #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxsoulard
Copy link

Simulates joystick click by calculating if the virtual stick position is
within the canvas circle.
basic example also updated to test the center position.

Simulates joystick click by calculating if the virtual stick position is
within the canvas circle.
basic example also updated to test the center position.
@jeromeetienne
Copy link
Owner

what about using current callbacks instead ? like here

It is more flexible and let the user chooses the behavior it want for the click

@maxsoulard
Copy link
Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants