Clamp entities' target position to the map dimensions.