예제 #1
0
    public override Vector2 CalculateSteering(Vehicle agent, List <Vehicle> targets)
    {
        Vector2 steering = Steering.AvoidWall(agent, feelerDegree, feelerLength, Wall.AllWalls);

        if (steering != Vector2.zero)
        {
            return(steering);
        }
        else
        {
            return(agent.heading * 5f);
        }
    }