Jump to content

Will Phaser get a raycasting feature in the future?


Recommended Posts

I stumbled upon this in the examples: link

The new lights feature is pretty cool but it "shines" through other tiles whereas an actual light would only shine at the outer tiles. But still, it exists so maybe there's more light related stuff coming up? Raycasting would be a very welcome addition. The example here seems to be popular but it's in Phaser 2 and is... well, complicated. And custom implementations probably aren't as performant as native ones could be. So is raycasting and/or others ever gonna appear in Phaser? It would be amazing to have some kind of RayCaster as a game object where the user can just pass references to tile layers, sprites and other game objects to cast rays on them and use it to generate light or checking whether something exists within the raycaster's "view". Would be helpful not only with graphics but AI as well.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...