public Waypoint getClosestWaypoint(Vector2 pos)
	{
		if (waypoints.size() > 0)
		{
			Waypoint start = waypoints.get(0);
			double min = pos.getDistance(start.drawX(), start.drawY());

			for (Waypoint w : waypoints)
			{
				double tmp = pos.getDistance(w.drawX(), w.drawY());
				if (tmp < min)
				{
					start = w;
					min = tmp;
				}
			}
			
			return start;
		}
		else
			return null;
	}