Hi everyone
Quick question and I have a feeling its a quick answer as I think I’m just being dumb. With the method OnTriggerEnter I my gameobject to destroy itself if it collides with anything physically in the game world, whether it be an enemy or world geometry.
Any help is greatly appreciated and if it helps get me an answer then here some basic sudo code.
void OnTriggerEnter (Collider collider)
{
if (this.gameObject collides with anything in the world)
{
destroy (this.gameobject);
}
}