|
I have such script:
After objects were triggered and another of them was destroyed OnTriggerExit() of current object isn't invoked and object remains highlighted. Why so?
(comments are locked)
|
|
Because that's the way it works, whether it's a bug or intentional I don't know, but I think it's always been like that. My solution is to move the object far away for one frame before destroying it; that way OnTriggerExit will always fire. Thanks for your answer. I have solved this problem using list of triggered object and new OnDestroy() method (in Unity 3.2). In OnDestroy() I forcedly call OnTriggerExit() on all with destroyed object triggered objects. In this way it works!
Mar 04 '11 at 09:08 AM
Anton Grigoryev
(comments are locked)
|
