im using the characterController to move me(my players character), and my ai characters, and they will recognize collision with each other, but how do you reference the ai's gameObject that im colliding with to, in this case Destroy() the AI my Player collided with?
function OnControllerColliderHit(hit:ControllerColliderHit){ if(hit.rigidbody.tag=="Enemy"){ print("hit");//wont print Destroy(hit.gameObject); } }
how do i check if what i run into is my ai character tagged Enemy?