// Use this for initialization private void Start() { // get the components on the object we need ( should not be null due to require component so no need to check ) agent = GetComponentInChildren<NavMeshAgent>(); character = GetComponent<UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter>(); agent.updateRotation = false; agent.updatePosition = true; }
public Transform target; // target to aim for // Use this for initialization private void Start() { // get the components on the object we need ( should not be null due to require component so no need to check ) agent = GetComponentInChildren <NavMeshAgent>(); character = GetComponent <UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter>(); agent.updateRotation = false; agent.updatePosition = true; }
private void Start() { character = GetComponent<UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter>(); }