Jump to content

Check collision between invisible Displayobjects


Mathieu Anthoine
 Share

Recommended Posts

Hi,

 

I'm working on a CollisionManager objet.

I would like to split my graphic objets between graphic assets and collision boxes.

The collision boxes need to be visible for debug and invisible for release version.

That works perfectly with "contains" methods of Rectangle, Circle, etc. when the collision boxes are visible but when I set visible to false, as the worldTransform datas aren't updated, the result of the collision doesn't work.

 

Instead of visible, if I set alpha to 0, it works perfectly, but in terms of performance is it a bad idea or there's no difference in term of display between alpha=0 and visible=false ?

 

Or maybe there's another way to manage that :)

 

Thanks in advance.

Link to comment
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...
 Share

  • Recently Browsing   0 members

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