You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading the issues, it appears a fire button should appear when touching the right of the screen. The thing is when touching the right of the screen, the joystick appears and not the fire button.
Is there anything else to do to have the firebutton ? How do I listen for firebutton presses ? Is there an equivalent to joystick.left() ? Maybe joystick.fire() ?
Thanks for the help.
The text was updated successfully, but these errors were encountered:
There isn't a built in fire button. You need to create a second joystick, constrain it's stick radius to 0, and use the touchstart event listener to detect touch events on that joystick. In that touchstart event listener, you'd then add whatever code you have to fire whatever you're looking to fire.
Reading the issues, it appears a fire button should appear when touching the right of the screen. The thing is when touching the right of the screen, the joystick appears and not the fire button.
I'm initializing virtualjoystick like this:
joystick = this.joystick = new VirtualJoystick({
container : document.getElementsByClassName('main')[0],
mouseSupport : true,
});
Is there anything else to do to have the firebutton ? How do I listen for firebutton presses ? Is there an equivalent to joystick.left() ? Maybe joystick.fire() ?
Thanks for the help.
The text was updated successfully, but these errors were encountered: