1 decade ago by Eddie
In Impact, we have
Binding the action to a key works, so that pressing the key does the action and touching the button on my iPhone makes it work too, but not click on it with a mouse on a regular browser. I tried using the object ID like how
Thoughts?
ig.input.bind
to bind keys to a specific action, like the left and right to our walk
action, and there&039;s also #ig.input.bindTouch
which binds HTML objects to a touch, or a touchstart
and touchend
event. But is there any form of binding that will allow me to bind a mouse click to an HTML element? I ask because I thought a mouse click would also be considered touch, since mouse clickable objects are considered to be touched on iOS or Android browsers, but such is not the case! I have an HTML button I want to bind to an action in the game so that it changes a parameter that can only be changed in the game loop, but I can't figure out how.Binding the action to a key works, so that pressing the key does the action and touching the button on my iPhone makes it work too, but not click on it with a mouse on a regular browser. I tried using the object ID like how
bindTouch
does on a regular bind
, but that also does not work.Thoughts?