hey all
i am using a arongranberg’s project the " pathfinding-project " and i follow the tutorial in that website
Here
and then write the code in that website like this :
using UnityEngine;
using System.Collections;
using Pathfinding;
public class AstarAI : MonoBehaviour {
public Vector3 targetPosition;
public void Start () {
Seeker seeker = GetComponent<Seeker>();
//Start a new path to the targetPosition, return the result to the MyCompleteFunction
//seeker.StartPath (transform.position,targetPosition, MyCompleteFunction);
seeker.StartPath (transform.position,GameObject.Find("target").transform.position, MyCompleteFunction);
}
public void MyCompleteFunction (Path p) {
Debug.Log ("Yey, we got a path back. Did it have an error? "+p.error);
}
}
and then add the component Seeker to the game object when i run the game the line (Gizmo) is appear from the start point to the target in the scene, but how I can use the Seeker class in the code ? when I start to write Seeker nothing show like it doesn’t exists and when use the “seeker” object with the dot ( seeker. ) no method or variable appear ?
second thing can i apply the same idea but not on game object but on first person controller .
last thing how to make a specific object follow that path ?
i really need your help