woratana Posted August 6, 2014 Share Posted August 6, 2014 I have read from this topic about history on pointer.http://www.html5gamedevs.com/topic/2777-dragged-sprite-physics/ However, when I tried with this code:startDrag: function(sprite) { this.currentInput = this.input.activePointer; this.currentInput.recordPointerHistory = true;},stopDrag: function(sprite) { console.log( this.currentInput );}The _history array is empty in console. Please let me know how to make the pointer record history. Link to comment Share on other sites More sharing options...
lewster32 Posted August 6, 2014 Share Posted August 6, 2014 You're trying to access the property on a Pointer object, but recordPointerHistory is a property of the Input object, of which which a single instance is created when you start Phaser - it's accessible from game.input. Link to comment Share on other sites More sharing options...
Recommended Posts