I have a AGV car and I want the car to follow the waypoints in my waypoints vector list when it’s moving.
Can someone help me to fix the line in the for loop to let the car follow the waypoints?
Code:
[java]
Spatial agv;
List<Vector3f> waypoint = new ArrayList<Vector3f>(); // waypoints list
public void drive(){
waypoint.add(new Vector3f(0,0,0));
waypoint.add(new Vector3f(15,0,0));
waypoint.add(new Vector3f(30,0,0));
waypoint.add(new Vector3f(30,0,15));
for (int i = 0; i < waypoint.size(); i++) {
agv.move(waypoint,0,waypoint); //how to fix this line?
}
}
[/java]