I have a problem various Colliders on one Gameobject

Hi Unity Community,

I got a problem with my 2D game!

In my scene i’ve got an enemy which walks from the right to the left and if my player hits the circle collider(representing the view) of the enemy he’s following me(the player) until I leave the circle collider. But the enemie has another collider which I used for the collision with the bullets of my player. Now when the bullet is hitting his “view” collider the enemy dies because both of the colliders are triggers!

My question is: Is there a possibility to manage the “view” thing otherwise or can I give the colliders tags or something like that to handle the differnet collisions?!

Greetings Gistiv

This should help http://answers.unity3d.com/questions/573394/multiple-trigger-colliders-on-one-gameobject.html

e.g, add another child gameobject and attach the circle collider (from the enemy object) and check for the collisions in anot

Thanks for the fast answer playmonkey!

Right now I handle the Collison with the Distance between the bullet an the enemy:

	void OnTriggerEnter2D(Collider2D other) 
	{

		if (other.gameObject.tag == "Enemy"  
                          Vector3.Distance(other.transform.position, gameObject.transform.position) < 0.75) 
		{
			Destroy(other.gameObject); 
			Destroy(gameObject);
		}
	}

but I think I’ll change it because it’s much easier to handle with such a childobject…