I am using a pooling system and as a result enemies get despawned or set as inactive, my problem is that the enemy sets off the ontrigger enter and the good guy shoots at him, but when he dies(despawns) the good guy thinks he is still there and keeps shooting.
Wouldn’t being set as inactive trigger the ontriggerexit event on the good guy and make him stop shooting?
Collision and Trigger events are called when colliders with at least one rigidbody between them touch. The OnTriggerExit is called when they no longer touch. I can see that logically you would think that since the object has been disabled, it is no longer touching and should send the event. But if it’s disabled then how can it call the event?