A comprehensive raycasting plugin for Phaser 3 that works with Arcade and Matter Physics.

Posted on 31st May 2021. Follow @phaser_ and get the Phaser World newsletter.


Wiserim on GitHub has released Phaser Raycaster v0.9.3, a Phaser 3 plugin which provide raycasting for geometric Game Objects, Sprites and Matter.js bodies. It can be used with Arcade Physics and Matter Physics.



  • Compatible with Arcade and Matter Physics.
  • Raycasting in a single direction, 360 degrees circle or in a cone.
  • Visibility detection - collision detection with game objects.
  • Test rays against mapped Game Objects: Containers, Lines, Rectangles, Polygons, Circles, Sprites, Tilemaps and Matter bodies.
  • Provides closest intersection points between rays and tested objects.
  • Tests can be made on all mapped objects, selected ones or only ones within detection range.
  • Static and Dynamic mapping for individual objects.
  • Mapped objects intersections detection.

The plugin comes with full documentation and examples on Codepen.

Read More

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