void FixedUpdate() { path.Draw(); if (reversePath && followPath.IsAtEndOfPath(path)) { path.ReversePath(); } Vector3 accel = followPath.GetSteering(path, pathLoop); steeringBasics.Steer(accel); steeringBasics.LookWhereYoureGoing(); }
void FixedUpdate() { path.Draw(); if (followPath.IsAtEndOfPath(path)) { path.ReversePath(); } Vector3 accel = colAvoid.GetSteering(colAvoidSensor.targets); if (accel.magnitude < 0.005f) { accel = followPath.GetSteering(path); } steeringBasics.Steer(accel); steeringBasics.LookWhereYoureGoing(); }