public void updateFog(Unit u, int x, int y){
      //what fog node was the unit standing on?
      if(x<0 || y<0 || x>=fogAmount || y>=fogAmount){
          return;
      }
      FogNode current = fog[u.fogX][u.fogY];
      if(u.team==playerTeam){
          updateVision(current, -u.sight);
      }
      Node oldNode = current.mapNode;
      u.fogX = x;
      u.fogY = y;
      if(isValidFog(x, y)){
          current = fog[u.fogX][u.fogY];
          if(u.team==playerTeam){
              updateVision(current, u.sight);
          }
          if(oldNode!=current.mapNode){
              oldNode.detachChild(u.model);
              current.mapNode.attachChild(u.model);
          }
      }
  }