fix(collision): terrain bbox proxy buried the whole street
The player never fell through - it stood on an invisible 8 m box. The imported Terrain_DEM carried only a bounding-box simple collision proxy, so every downward trace in the block hit Demo_Terrain_DEM at Z 819 (the mesh bbox max) and the road/sidewalk underneath were unreachable. The view from up there looked plausible, which is why it read as working. - add UGigLineAssetTools (C++): set complex-as-simple collision on a static mesh; UE 5.8 exposes ECollisionTraceFlag, not bUseComplexAsSimpleCollision, and Python cannot set it at all. - builder forces + saves the terrain asset as complex-as-simple (the flag lives on the asset, so saving only the .umap loses it). - spawn (-13336, -1150, 600): inside the carved corridor; lands on the road at Z 456 (feet 368 on road top 366). - HighResShot 1280x720, not "1280 720" (that is multiplier 1280). - keep SIM + single ground-probe diagnostics (TEMP QA).
This commit is contained in:
1 parent
2bab0fb0cd
commit
2bb1e74814
14 files changed
+157
-21
No files matched your search
@@ -301,6 +301,19 @@ def build():
|
||||
mesh = unreal.EditorAssetLibrary.load_asset(f"/Game/Hollywood/Site/{name}")
|
||||
if mesh is None:
|
||||
continue
|
||||
# The imported terrain carries a bounding-box simple collision proxy,
|
||||
# which puts an invisible lid ~8 m over the whole block: the player
|
||||
# walks on that box instead of the street. Force trace against the real
|
||||
# triangles so the carved street corridor is actually open.
|
||||
if "Terrain" in name:
|
||||
asset = unreal.EditorAssetLibrary.load_asset(f"/Game/Hollywood/Site/{name}")
|
||||
if asset:
|
||||
unreal.GigLineAssetTools.set_complex_collision_as_simple(asset, True)
|
||||
# The flag lives on the asset, not the map: persist it or the
|
||||
# next session reloads the bbox proxy and the street is buried.
|
||||
saved_asset = unreal.EditorAssetLibrary.save_loaded_asset(asset)
|
||||
log(f"terrain collision: {unreal.GigLineAssetTools.get_collision_complexity(asset)} "
|
||||
f"(saved asset: {saved_asset})")
|
||||
actor = spawn(unreal.StaticMeshActor, unreal.Vector(0, 0, 0), f"Demo_{name}")
|
||||
if actor:
|
||||
comp = actor.static_mesh_component
|
||||
@@ -372,14 +385,17 @@ def build():
|
||||
# sidewalk is at Y -1912..-1053 and the SOUTH sidewalk at Y +718..+1447.
|
||||
# The hero facade is on the SOUTH side at Y +1307. Stand on the north
|
||||
# sidewalk and face south (+Y, yaw 90) across the road at it.
|
||||
# Z: the terrain here is ~Z 99-138. The capsule half-height is 87.5 cm, so
|
||||
# feet must start ABOVE the surface or the point is embedded and UE rejects
|
||||
# the PlayerStart ("NO PLAYERSTART with positive rating"), dropping the pawn
|
||||
# at the world origin to fall through. Cap feet ~80 cm above grade: centre
|
||||
# ~138+80+87 = 305, so Z 300 lets it drop cleanly and gravity settles it.
|
||||
spawn(unreal.PlayerStart, unreal.Vector(-13336.0, -1700.0, 300.0), "Demo_PlayerStart",
|
||||
# CRITICAL: the terrain is only carved inside the street corridor, and
|
||||
# terrain_from_dem.py --corridor 10.7 is a HALF-width around the road
|
||||
# centreline (Y ~= -167), so the cut band is Y -1237..+902. A PlayerStart at
|
||||
# Y -1700 sits OUTSIDE it, under ~8 m of uncut terrain: the capsule spawns
|
||||
# embedded, depenetration pops it to Z ~909 (terrain top 819 + half-height
|
||||
# 87.5) and it never touches the sidewalk. Y -1150 is on the north sidewalk
|
||||
# (Y -1912..-1053) AND inside the cut, so the pavement is the ground.
|
||||
# Z 600 is clear air; the capsule drops onto the pavement and settles.
|
||||
spawn(unreal.PlayerStart, unreal.Vector(-13336.0, -1150.0, 600.0), "Demo_PlayerStart",
|
||||
unreal.Rotator(pitch=0.0, yaw=90.0, roll=0.0))
|
||||
log("staged: Demo_PlayerStart on the north sidewalk (cap above grade), facing south (+Y)")
|
||||
log("staged: Demo_PlayerStart on the cut north sidewalk, facing south (+Y)")
|
||||
|
||||
# A lockable LFS .umap checks out read-only, which makes save_map silently
|
||||
# return False — chmod u+w first or the staged actors never persist.
|
||||
|
||||
Reference in new issue
Block a user