Jump to content

Raycasting in Phaser 3 porting an V2 example


Recommended Posts


Since I started quite recently with Phaser 3, I'm not too familiar with "how all the concepts worked in V2". In an attempt to port a raycasting example from V2 to V3 I got stuck on the part where `bitmapData` is used. Apperantly it no longer exists in V3 and from what I read on this forum "one should create their own". Whilst this is mentioned a couple of times, no concrete examples are given. So my question is, how would I procede? This is the original raycasting example I try to port.

    this.bitmap = this.game.add.bitmapData(this.game.width, this.game.height);
    this.bitmap.context.fillStyle = 'rgb(255, 255, 255)';
    this.bitmap.context.strokeStyle = 'rgb(255, 255, 255)';

Of course, if there is a better approach or an alternative way of approaching the raycasting I'd love to hear it!

Link to comment
Share on other sites


  • Recently Browsing   0 members

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