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 cjennison

How would you go about linking an entity to follow the mouse or finger( on mobile )?
What would I need to do?

1 decade ago by Arantor

During the entity's update method, check ig.input.mouse.x and ig.input.mouse.y and update this.pos.x and this.pos.y. More information can be found in the manual for these things.

1 decade ago by cjennison

Does a touch register equally as a mouse input?

1 decade ago by alexandre

Check the docs on the Input class, and the ones about iOSImpact. IIRC it's all there.

1 decade ago by paulh

yes, but theres some skullduggery in iosimpact, search is your friend.

1 decade ago by Arantor

Yes, basically a single touch does respond through the mouse input. Multi-touch... not so much, though there are plugins that do handle multi-touch should you really need it. It's actually better to avoid it if possible knowing that it is actually sort of buggy on iOS.

1 decade ago by paulh

i wasnt getting accurate mouse inputs on iosimpact using


  if (ig.input.state('mouseLeft')) {
    ig.game.spawnEntity( FireGib, ig.input.mouse.x,ig.input.mouse.y );
   
    }

1 decade ago by Arantor

Yes, but were you using multi-touch?
Page 1 of 1
« first « previous next › last »