I have a bunch of generated rigidbodies, all with the same script attached to them so they behave the same. When two collide i want to destroy them both and create one new rigidbody.
The problem I have is that it creates 2 new rigidbodies, because the script is attached to both colliding objects, and thus gets executed twice. Is there a simple way I can make something happen just the once in this context?
I thought that if i destroyed both in one iteration of the script then the script wouldn’t run for a second time, this does not appear to be the case however.
Cheers for your help.