-
Notifications
You must be signed in to change notification settings - Fork 178
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
Best Way to handle touch as directional control #71
Comments
Hi @ningacoding, The touch event should have enough data in its payload to help you determine direction. Something like:
For something with a little more functionality, you can take a look at the Gamepad Controller System from the template project. Hope that helps! |
Hi @bberak , thank you for your answer. with Gamepad Controller System, How i detect "up", "left", "down", "right" events? I just need to call dispatch("up") to fire event, but i don't under stand the code inside gamepad-controler. I already added the component into my App: But i don't understand how it works, I move the D-Pad, it just turns from transparent to white and viceversa. I don't see D-Pad move. |
Hi,Could you please help me how can i add the gamepad-controller into my own project. i have tried it serval times,but it dose not work |
Hello, what's the best Way to handle touch user input? in order to build a simple directional (up,right,down,left) control.
The touches only have type 'move', 'long-press', etc.
Is there a Way the touches gives the orientation natively?
Adding event types like 'move-left', etc.
The text was updated successfully, but these errors were encountered: