// Update is called once per frame void Update() { Vector2 hidePosition; Vector2 hideAccel = hide.getSteering(target, obstacleSpawner.objs, out hidePosition); Vector2 accel = wallAvoid.getSteering(hidePosition - (Vector2)transform.position); if (accel.magnitude < 0.005f) { accel = hideAccel; } steeringBasics.steer(accel); steeringBasics.lookWhereYoureGoing(); }