Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by garfnarf

Hi guys,
i try to build a mobile positioning system. I want to use the mouse position.

in the main.js so i used this formy init function:

init: function() {
     ig.input.initMouse ();
},

in my Entety i uses this:

update: function(){
     this.parent();
     this.pos.x = ig.input.mouse.x - this.size.x/2;
},

This Code workes at the desctop browser, but not at a mobile browser.
On a mobile browser the position is only detectet, when i press the screen, but if i try to slide on it, it does not work.

1 decade ago by dominic

Looks alright. The ig.input.mouse.x/y should be updated on touch move as well. What device and browser are you testing this on?

1 decade ago by garfnarf

I use Chrome on my Galaxy Note2. If i use the pencil of the note it works well. I have no idea what is wrong there.
Page 1 of 1
« first « previous next › last »