Seemingly easy Targetting problem!
Hello guys. I'm trying to use AICharacterControl script of Standart Assets from a player controller script I made. My goal is the make AIthirdpersoncharacter run towards my character when a "Pick Up" object is picked up. I'm trying to make it from playercontroller script. I couldnt managed it.
public Text winText;
public UnityStandardAssets.Characters.ThirdPerson.AICharacterControl PoliceRun;
private GameObject Winston;
private NavMeshAgent police;
private int count;
private Rigidbody rb;
private Transform target;
private Vector3 place;
void OnTriggerEnter(Collider other) {
if (other.gameObject.CompareTag("Pick Up")) ;
{
other.gameObject.SetActive(false);
count = count + 1;
SetCountText();
place = GameObject.FindWithTag("Winston").transform.position;
PoliceRun.target = Winston.transform;
Comment
Your answer
Follow this Question
Related Questions
Camera change targets when new object appears or Camera change targets by pressing a button 1 Answer
How do I use a spherecast to spawn multiple target images at multiple objects? (script provided) 1 Answer
Targeting Script Errors 0 Answers
Switching Target 0 Answers
Constantly Targeting with an InvokeRepeating and Random Targeting 0 Answers