- Home /
Check If Any Objects In Your Game Are Colliding?
Hi,
it seems like a simple thing to do. I've searched but couldn't find the same question.
Is it possible to check how many objects in your game are colliding with each other? Even just a check to see if any objects are colliding at all would suffice.
Thanks.
Answer by meat5000 · Apr 05, 2016 at 02:43 PM
This question has been asked before. I know this because I've answered it before.
Collision information is only populated inside the relevant callback routines/messages on the script's object receiving the collision. The only thing you can do is either expose the information yourself or to send message (or otherwise) to transmit the data.
You can make an object (perhaps static) to receive all the data sent by the colliding objects and set up this information for you but it will not be without its performance deficit.
http://forum.unity3d.com/threads/external-object-collisions.69008/