HI i have downloaded the beata version of the pro pathfinding and i want to add the local avoidance 2d to my game. I am having problems with the people walking though each other.
This is the scripts i have on my people.
And the customer path is the script i was using to do the path finding without the local avoidance.
using UnityEngine;
using System.Collections;
using System;
using Pathfinding;
public class CustomerPath : AILerp {
public GameObject[] wayPoints;
private Transform homePoint;
private int nextPosition = 0;
public int currentPosition = 0;
private Person person;
new void Start()
{
person = new Person ();
GameObject homePoint = GameObject.FindGameObjectWithTag("HomePoint");
wayPoints = GameObject.FindGameObjectsWithTag("WayPoints");
///randomize the array
Randomizer.Randomize(wayPoints);
Array.Resize(ref wayPoints, wayPoints.Length + 1);
wayPoints[wayPoints.Length -1] = homePoint.gameObject;
seeker.StartPath(transform.position, wayPoints[nextPosition].transform.position, OnPathComplete);
}
public override void OnTargetReached ()
{
nextPosition++;
if(nextPosition >= wayPoints.Length)
{
person.CheckOut();
Destroy(this.gameObject);
return;
}
StartCoroutine("PauseAtShelf");
}
IEnumerator PauseAtShelf()
{
Shelf shelf = wayPoints[currentPosition].transform.parent.GetComponent<Shelf>();
person.BuySomething(shelf);
currentPosition++;
yield return new WaitForSeconds(0.4f);
seeker.StartPath(transform.position, wayPoints[nextPosition].transform.position, OnPathComplete);
}
}
Can you help me please i am unsure what i must do next.