proyb2 Posted July 11, 2015 Share Posted July 11, 2015 Using bitmapData to draw 2 lines, how do I get the intersection x and y point?bmd = game.add.bitmapData(100,100);bmd.ctx.lineWidth="1";bmd.ctx.strokeStyle="red";bmd.ctx.moveTo(0, 0);bmd.ctx.lineTo(100, 80);bmd.ctx.moveTo(100, 0);bmd.ctx.lineTo(10, 100); Link to comment Share on other sites More sharing options...
wayfinder Posted July 11, 2015 Share Posted July 11, 2015 Phaser.Line has a function for that! http://phaser.io/docs/2.3.0/Phaser.Line.html#intersectsPoints Link to comment Share on other sites More sharing options...
Recommended Posts