Jump to content

Is it possible to debug-display sprite?


KungFuFlames
 Share

Recommended Posts

I do not use physics in the game, but I found more 'native' way to do it:

let render = gameScene.add.graphics();
let bounds = this.getBounds();

render.lineStyle(3, 0xffff37);
render.strokeRectShape(bounds);

basicly I use getBounds() method of the Sprite to get the surrounding rectangle and than you can make some graphics with it.

Link to comment
Share on other sites

  • 1 month later...
 Share

  • Recently Browsing   0 members

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