def snapToGround(world, location):
	"""Mutates @location to have the same z-coordinate as the nearest waypoint in @world."""
	waypoint = world.get_map().get_waypoint(location)
	location.z = waypoint.transform.location.z + 0.5
	return location