Assets.Standard_Assets.Characters.ThirdPersonCharacter.Scripts.AICharacterControl.Update C# (CSharp) Method

Update() private method

private Update ( ) : void
return void
        private void Update()
        {
            if (target != null)
            {
                agent.SetDestination(target.position);

                // use the values to move the character
                character.Move(agent.desiredVelocity, false, false);
            }
            else
            {
                // We still need to call the character's move function, but we send zeroed input as the move param.
                character.Move(Vector3.zero, false, false);
            }
        }