fix(site): slice the road too - the 2 m lid was a convex hull, not geometry
The road was never mis-modelled: a 279 m strip imports with ONE auto-generated convex hull, and a convex hull's top is the strip's maximum height. A downward trace therefore landed at 366 cm - a flat lid about 2 m above the visible road, which sits at roughly 152 cm there. That single fact explains every failed sidewalk fix, the 'road above its own sidewalk' reading, and why the player always ended up on Road_Hollywood. Slicing the road the way the sidewalks already were fixes it, and the cross-section is now continuous: Terrain_DEM 154 Sidewalk_North_07 158 Road_Hollywood_07 158 (was 366) Two changes had to land together: the road exported in slices, and the map stopped staging the single Road_Hollywood asset - which still sat on top of the slices and won every trace until removed. All 23 captures regenerated; the player and the car both stand on a continuous ground plane.
This commit is contained in:
1 parent
4132dc77e3
commit
1b4b46e957
131 files changed
+224
-160
No files matched your search
@@ -503,17 +503,13 @@ def build():
|
||||
# Segmented ground: the site export slices sidewalks and kerbs into 20 m pieces, so the
|
||||
# map stages every slice. A single 279 m slab could not report an honest local height and
|
||||
# its collision was degenerate; slices fix both.
|
||||
segments = [f"Sidewalk_North_{i:02d}" for i in range(14)] + \
|
||||
segments = [f"Road_Hollywood_{i:02d}" for i in range(14)] + \
|
||||
[f"Sidewalk_North_{i:02d}" for i in range(14)] + \
|
||||
[f"Sidewalk_South_{i:02d}" for i in range(14)] + \
|
||||
[f"Kerb_North_{i:02d}" for i in range(14)] + \
|
||||
[f"Kerb_South_{i:02d}" for i in range(14)]
|
||||
SURFACE_MATERIALS = {
|
||||
"Terrain_DEM": "M_Ground",
|
||||
"Road_Hollywood": "M_Asphalt",
|
||||
"Sidewalk_South": "M_Concrete",
|
||||
"Sidewalk_North": "M_Concrete",
|
||||
"Kerb_South": "M_KerbConcrete",
|
||||
"Kerb_North": "M_KerbConcrete",
|
||||
"Crossing_Markings": "M_RoadPaint",
|
||||
}
|
||||
textures = ensure_textures()
|
||||
@@ -523,8 +519,12 @@ def build():
|
||||
|
||||
for segment in segments:
|
||||
if unreal.EditorAssetLibrary.does_asset_exist(f"/Game/Hollywood/Site/{segment}"):
|
||||
SURFACE_MATERIALS[segment] = ("M_Concrete" if "Sidewalk" in segment
|
||||
else "M_KerbConcrete")
|
||||
if "Road" in segment:
|
||||
SURFACE_MATERIALS[segment] = "M_Asphalt"
|
||||
elif "Sidewalk" in segment:
|
||||
SURFACE_MATERIALS[segment] = "M_Concrete"
|
||||
else:
|
||||
SURFACE_MATERIALS[segment] = "M_KerbConcrete"
|
||||
|
||||
imported = 0
|
||||
for name, mat_name in SURFACE_MATERIALS.items():
|
||||
|
||||
@@ -109,8 +109,8 @@ def main():
|
||||
continue
|
||||
# Segmented ground surfaces keep their names with a numeric suffix; both the base
|
||||
# names and the slices want the same walkable collision.
|
||||
walkable = ("Terrain_DEM", "Road_Hollywood", "Sidewalk_South", "Sidewalk_North",
|
||||
"Kerb_South", "Kerb_North")
|
||||
walkable = ("Terrain_DEM", "Road_Hollywood", "Road_Hollywood_",
|
||||
"Sidewalk_South", "Sidewalk_North", "Kerb_South", "Kerb_North")
|
||||
collision = "complex" if any(stem.startswith(w) for w in walkable) else "simple"
|
||||
import_fbx(path, stem, collision)
|
||||
unreal.EditorLoadingAndSavingUtils.save_dirty_packages(True, True)
|
||||
|
||||
Reference in new issue
Block a user