1 decade ago
by FabienM
Hi,
when my user touches the screen of his mobile device, is it like a mousedown action ?
what is the event to bind ?
thxs
Fabien
1 decade ago
by dominic
Yes, you can bind
ig.KEY.MOUSE1
for touch input and get the touch coordinates from
ig.input.mouse.x/y
.
Also have a look at
bindTouch() if you want to create static buttons.
1 decade ago
by FabienM
Can't we be more specific ?
I would like to bind the mouseDown event and the mouseUp ?
Can't you code this into your update function manually?
ig.input.bind(ig.KEY.MOUSE1, "touch");
this.touchDown = false;
within update loop:
if(ig.input.pressed("touch")){
this.touchDown = true;
do mouseDown action.
}
if(!ig.input.(state"touch") && touchDown == true) {
this.touchDown = false;
do mouseUp action.
}
something along those lines.
or use:
.pressed( action )
and
.released( action )
Page 1 of 1
« first
« previous
next ›
last »