I have a set path that my AI needs to follow.
The path is an array like so:
function GetPath() {
var path_objs : Array = pathGroup.GetComponentsInChildren(Transform);
path = new Array();
for (var path_obj : Transform in path_objs){
if (path_obj != pathGroup)
path [path.length] = path_obj;
}
}
I try to find the z position of the next point by:
var nextPathPointPosition = path[currentPathObj].transform.position.z;
and that doesn’t work.
I get the error : “BCE0019: ‘transform’ is not a member of ‘Object’.”
please help