A short but useful tutorial on handling circle to line segment intersection in your games.
Emanuele Feronato has written this tutorial for circle to line segment intersection detection: "As a part in a bigger project – which you will hear about soon – I needed to find a quick way to check for collisions between a line segment and a circle.
It’s quite an easy task, but man, I found a lot of really weird ways to do it, so here’s my take ..."
This is handy for Phaser 2, but if you're using Phaser 3 then we provide the built-in
Phaser.Geom.Intersects.LineToCircle function for you.
The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
- By Emanuele Feronato
- 155 Pages
- 28 Source Code Examples
- Build a complete game from start to finish
- Cross Platform
- Scaling for devices