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 Marenz

I've initted the Mouse but I still get nothing back.

ig.input.initMouse();
console.log(ig.input.mouse.x + ' ' + ig.input.mouse.y);

The results are always "0 0" My goal is to detect the position of a touch of the game screen for a mobile-only game.

1 decade ago by Ecnarongi

Where are you putting this code?

I have used "ig.input.mouse.x" in alert windows of entities and it seems to be accurate.

1 decade ago by Marenz

I'm calling it in an update function of an entity.

I've tried it in the main.js update as well with no luck. The init command is in the main.js init.

It seems to be working for everyone else.

1 decade ago by Marenz

Oh, I had a div layered over the game for the score & life display. Doh!
Page 1 of 1
« first « previous next › last »