NavMeshAgent and collision

Hey guys, im new here, so sorry for stupid question :slight_smile:

I am using NavMeshAgent for my player character and wanted to make so that when player is close enough to an enemy, enemy starts to attack him.

I was trying to use an internal to enemy unit collider (screenshot), but OnCollisionEnter/OnTriggerEnter events do not fire.

What am i doing wrong?

public class Creature : MonoBehaviour 
{
  void OnTriggerEnter(Collider other) {
    Debug.Log ("yyy " + other.gameObject.name);
  }

  void OnCollisionEnter(Collision collision) {
    Debug.Log ("xxx " + collision.other.name);
  }
}

73763-screen-shot-2016-07-09-at-192748.png

You should attach a Rigidbody (set Kinematic on) and a collider on your navmesh agent, and you will receive OnTrigger callbacks.