alexandernst Posted March 10, 2018 Author Share Posted March 10, 2018 Answering to my own question: http://plnkr.co/edit/nBoIiwjEA5M93OUawayX?p=preview this.input.on("pointermove", function(pointer) { var angle = Math.atan2(pointer.y - this.gun.y, pointer.x - this.gun.x) * 180 / Math.PI; this.gun.angle = angle; }, this); Link to comment Share on other sites More sharing options...
Recommended Posts