Make trigger be activated only by the player

How to the collider be triggered only by the player?

You should try to search for your question first, but here you are anyway:

function OnTriggerEnter (other : Collider) {
if(other.tag == "Player") {

Do determine the object you just collided with you can examine the Collider passed to the function or more specific the gameobject like in my example.


	void OnTriggerEnter(Collider c){
		if( == "Player")
			Debug.Log ("Player triggered");
			Debug.Log ("Something else triggered");