ruzi Posted July 3, 2014 Share Posted July 3, 2014 and change propertyif(game.input.mousePointer.targetObject){ // over any active spritesprite = game.input.mousePointer.targetObject;sprite.body.thrust(0);} Link to comment Share on other sites More sharing options...
lewster32 Posted July 3, 2014 Share Posted July 3, 2014 Normally you'd use events for this - onInputOver detects pointer over events, if you want clicks/taps use onInputDown:sprite.inputEnabled = true;sprite.events.onInputOver.add(function(currentSprite) { currentSprite.body.thrust(0);}, this); Link to comment Share on other sites More sharing options...
Recommended Posts