pub fn s2_to_osmap(s2: S2Map, source_filename: &str) -> OpenStrandedMapExpand description
Convert a parsed .s2 map into an .osmap (Bevy convention).
§Coordinate conversion
.s2 stores positions in Blitz3D convention:
- origin at terrain corner (0..terrain_size in both X and Z)
- +Z forward
.osmap stores positions in Bevy convention:
- origin centered at the terrain centre
- −Z forward (Bevy standard)
- units = grid cells (same as .s2, i.e. one unit per terrain segment)
The engine scales grid-cell units to world units by multiplying with the
map’s step factor (step = 64.0 / terrain_size).