Riddik Posted July 11, 2014 Share Posted July 11, 2014 Hi!I need to manually call the inputDown event for drag with dispatch input events, how can I do this? Events added:item.events.onInputDown.add(selectItem);item.events.onInputUp.add(releaseItem); If do this:item.events.onInputDown.dispatch(item, game.input.activePointer);item.input.startDrag(game.input.activePointer);then events onInputUp don't dispatched. How can manually simulate inputDown to sprite? Link to comment Share on other sites More sharing options...
Riddik Posted July 11, 2014 Author Share Posted July 11, 2014 Update: I did this:item.update = itemDrag;function itemDrag(){ if(game.input.activePointer.isDown) { this.x = game.input.x; this.y = game.input.y; } else releaseItem(this, game.input.activePointer); }Works fine) Link to comment Share on other sites More sharing options...
Recommended Posts