Example #1
0
    public override Vector3 GetForce(Boid boid)
    {
        if (Vector3.Distance(boid.transform.position, path[currentWaypoint]) < arriveDistance)
        {
            currentWaypoint++;
            currentWaypoint %= path.Length;
            seeker.target    = path[currentWaypoint];
            arriver.target   = path[currentWaypoint];
        }

        return(seeker.GetForce(boid) + arriver.GetForce(boid));
    }
Example #2
0
 public override Vector3 GetForce(Boid boid)
 {
     seeker.target = boid.transform.position + boid.transform.forward;
     return(seeker.GetForce(boid));
 }
Example #3
0
 public override Vector3 GetForce(Boid boid)
 {
     seeker.target = target.transform.position;
     return(seeker.GetForce(boid));
 }