From 7d5a0657bb7f4950662386580ad6a348f1b938bc Mon Sep 17 00:00:00 2001 From: starmen1265 Date: Tue, 9 Jun 2026 19:11:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(asset-catalog):=20spawn=E5=90=8E=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEBlockAll=E7=A2=B0=E6=92=9E=E4=BD=BFLine=20Trace?= =?UTF-8?q?=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/asset-catalog/analyze_meshes.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/asset-catalog/analyze_meshes.py b/tools/asset-catalog/analyze_meshes.py index 16d798b..d8e5ce1 100644 --- a/tools/asset-catalog/analyze_meshes.py +++ b/tools/asset-catalog/analyze_meshes.py @@ -398,6 +398,15 @@ def _try_trace_detail_boxes(mesh, bmin: tuple, bmax: tuple) -> tuple: if not actor: return [], ["trace_fail: spawn None"] + # Set collision to BlockAll so traces can hit this mesh + smc = actor.get_component_by_class(unreal.StaticMeshComponent) + if smc: + try: + smc.set_collision_enabled(unreal.CollisionEnabled.QUERY_AND_PHYSICS) + smc.set_collision_profile_name("BlockAll") + except Exception as e: + debug.append(f"collision_set_warn: {e}") + try: hit_points = _perform_line_traces(actor, bmin, bmax) debug.append(f"trace_hits: {len(hit_points)}")