예제 #1
0
  @Override
  public float getForce(float elapsed, SteerSubject<V> subject, V out) {
    V targetPosition = target.getTarget(subject);

    if (targetPosition != null) {
      return away(subject, targetPosition, out, this);
    }

    return Steer.NONE;
  }
예제 #2
0
  @Override
  public Vector getTarget(SteerSubject subject) {
    Vector position = target.getTarget(subject);

    if (SteerMath.isCircleInView(
        subject.getPosition(), subject.getDirection(), fov, position, targetRadius, fovType)) {
      return position;
    }

    return null;
  }