AreteZero Posted January 29, 2016 Share Posted January 29, 2016 (edited) Hi, first time posting. I'm currently trying to predict the angle the ball will take after collision in a pool game. I attached a screenshot of what I want to implement. The white line coming in front of the pool cue shows where the ball will collide and the angle it will take after collision. Im currently using P2 Physics but cannot figure out what I should use to draw the line and calculate the angle. I started trying to use a geometry line, but that only shows in Debug mode, and I tried a Sprite that's a long line that I can then mask, but that's not working either. Any help would be appreciated, this is my first time making an html5 game and first time using phaser. I've previously made games for Mobile using Corona SDK and I know how I would draw the line there, but can't find anything in Phaser. Thanks! Edited January 29, 2016 by AreteZero Attached image Link to comment Share on other sites More sharing options...
icp Posted January 29, 2016 Share Posted January 29, 2016 You could adapt this example to fit your needs : http://phaser.io/examples/v2/p2-physics/gravity . Link to comment Share on other sites More sharing options...
Recommended Posts