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.
Learn to code and lead your intrepid crew on a mission to save The Cloud in TwilioQuest, a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available now for Windows, Mac, and Linux.
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
Buy Now
$19