karliky Posted June 28, 2018 Share Posted June 28, 2018 Dear phaser community. I'm using phaser 2.6.2. See the screenshot attached. The turret of the tank 1 is NOT facing the tank 2. The turret of the tank 2 IS facing the tank 1. I have the .rotation of both turrets and I would like to "detect" if a "turret is facing another tank". I've done several tests to check if so but none of them worked as expected. I want to learn how to do it, where should I start? Thank you. Link to comment Share on other sites More sharing options...
samme Posted June 29, 2018 Share Posted June 29, 2018 See Phaser.Line.intersectsRectangle(). You'll extend a line from each turret. Link to comment Share on other sites More sharing options...
Recommended Posts