com.position.set(endPos);
//reached the waypoint, is it the last? stop, otherwise go to next one
WayPoint last = com.path.WaypointList().get(com.path.WaypointList().size()-1);
if(com.cell == last.cell){
float dist = endPos.distanceSquared(last.position);
if(dist < 0.000001f){
com.position.set(last.position);
signalStopToEnv(com);