public Vector3 ComputeSteering() { if (IsTargetReach() || test) { Debug.Log("New wander position"); DesiredPosition = GetWandersPositon(TargetTr.position); test = false; } Debug.DrawLine(TargetTr.position, DesiredPosition, Color.green); Vector3 DesiredVelocity = new Vector3(); DesiredVelocity = arrival.ComputeSteering(DesiredPosition); return(DesiredVelocity); }