blade2xs

How to enable Debug showing Sprite collision boxes

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!!!

Share this post


Link to post
Share on other sites
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 :)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.