Hi all,
I have an object that on collision swaps to another version of the object with all the components seperate and each with a rigid body. The idea being it ‘explores’ into bits on collision.
This kind of works
Essentially when the object is collided with I can tell the ‘dummy’ object has been spawned but nothing happens for a few seconds before it falls apart i.e. physics etc. happen.
Not sure what’s causing the delay.
The original object is ‘thrown’ i.e. applyforce and moves correctly so I assume any instantiated objects from that will inherit velocity etc.
Again, it seems correct; but the new object just sits and waits a few seconds before doing the business. Does the new object also inherit the script of it’s parent? (though this shouldn’t be an issue as there is nothing in the update function).
I also get double collisions i.e. although I destroy the original object the collision still happens twice. Tried destroy immediate but Unity just hangs on that. Is there anyway to tell an object is ‘dying’ and so be ignored in the collision handler? (or is it a Unity bug anyway?)
Cheers