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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.