Enemy Trigger Colliders are triggering my player's trigger collider. Why?
I'm sure there's a simple explanation to this, but I cant get my head around it. Any help would be much appreciated. Here goes:
My enemy tanks have a rigidbody (for navmesh agent), a physical box collider (to detect being shot) and a large sphere trigger collider (to detect player).
My player has a rigidbody and a large sphere trigger collider (for detecting enemies).
Problem: The TRIGGER collider of the enemy is triggering the player's trigger collider. So my player is detecting the enemy long before it should.
What am I doing wrong?
Answer by orchard800 · Sep 20, 2015 at 07:32 PM
Got it:
 OnTriggerEnter(Collider other)
 {
     if(other.isTrigger)
         return;
 
     ...
 }
Leaving it on in case it helps anyone else
Your answer
 
 
             Follow this Question
Related Questions
OnTriggerEnter not firing 2 Answers
Calling "OnTriggerEnter" when a parent object has a rigidbody 0 Answers
Problem With Triggers? 0 Answers
OnTriggerEnter 1 Answer
OnTrigerEnter not working 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                