Answer the question
In order to leave comments, you need to log in
How to make the OnTriggerExit event fire?
Hello. There is a turret that has a sphere with a trigger collider, when a monster hits it, the turret starts shooting at it (More precisely, according to the position where the monster itself is located, the turret does not have the essence of monsters), while adding the monster's transform to the list with the monsters that are currently in collider. When a monster dies, it is disabled and sent to the pool. The problem is that when the monster is disabled, the OnTriggerExit event does not occur on the turret collider, and the turret seems to think that the monster is still in its field of view. How to solve this trouble? The monster has a collider and a rigidbody.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question