Edited to hopefully show up in more responses: I have a script that is intended to check an objects tag upon any collision and if it meets my conditions then destroy both objects and spawn in a new bigger one in the same place as the first object that collided. My problem is that instead of two smaller objects becoming one larger one as intended, I end up with two larger ones.
I thought that the bubSize var would stop it from triggering again since it would no longer be 0 but that and a bunch of other checks and balances I've tried have failed. It seems like it's going to call OnCollisionEnter twice no matter what.
If the script is attached to both objects, it will be run twice when the collide, once on each object, because each object detects the collision independently. Try checking not just the bubSize of the object the script is, but also the bubSize of the other object.
answered Dec 13 '09 at 04:57 AM