Mathieu Anthoine Posted March 27, 2015 Share Posted March 27, 2015 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. Quote Link to comment Share on other sites More sharing options...
achexi Posted March 27, 2015 Share Posted March 27, 2015 Really it all comes down to how many objects you intend to have in regards to performance. But both visible false and alpha 0 result in the object not being rendered so from that side your ok. Quote Link to comment Share on other sites More sharing options...
Mathieu Anthoine Posted March 27, 2015 Author Share Posted March 27, 2015 Perfect, thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.