Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

How to enable Debug showing Sprite collision boxes


blade2xs
 Share

Recommended Posts

Hey guys,

I have searched all over to figure this our but no luck.  How do I enable the debug to show the bounding/collision boxes on sprites in Phaser 3?  this was pretty easy to do in Phaser 2 but I dont see any docs on how to do this for 3.

 

Thanks!!!

Link to comment
Share on other sites

  • 8 months later...
11 minutes ago, rodrigezer said:

lol

i was looking for that option for one hour

But i have a problem
this.physics.add.image(400, 100, 'block'); <<< It renders debug overlay, cool

this.add.image(400, 100, 'block'); <<< render nothing. :(
http://labs.phaser.io/edit.html?src=src\physics\arcade\simple body.js

It has to be attached to a physics body to see the bounds of the box, otherwise you have to write your own graphics outline of a scene.add.image, which is not connected to a physics body... unless there is a higher level debug flag in the config I dont know about :)

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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