From 5d2e7e2aab157fbdbc73546ac96bb912656a811f Mon Sep 17 00:00:00 2001 From: Tom Boullay Date: Mon, 1 Jun 2026 11:28:15 +0200 Subject: [PATCH] fix(world): allow walking through la fabrik door Strip the 'porte' mesh from the cloned scene used to build the la fabrik collision octree. The wall geometry already has a doorway cutout, so removing the door slab leaves the opening passable. The visual model is rendered separately by MergedStaticMapModel and is unaffected. Drops the stop-gap LA_FABRIK_COLLISION_Y_OFFSET added during debugging. --- src/world/GameMapCollision.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/world/GameMapCollision.tsx b/src/world/GameMapCollision.tsx index 9d038d7..c745ddc 100644 --- a/src/world/GameMapCollision.tsx +++ b/src/world/GameMapCollision.tsx @@ -223,6 +223,22 @@ function CollisionModelInstance({ scale: normalizedScale, }); const sceneInstance = useClonedObject(scene); + useEffect(() => { + // Strip the door slab from the la fabrik collision octree so the player + // can walk through the doorway. The visual model is rendered separately + // by MergedStaticMapModel and is unaffected. + if (node.name !== "lafabrik") return; + + const removed: THREE.Object3D[] = []; + sceneInstance.traverse((child) => { + if (child.name === "porte") { + removed.push(child); + } + }); + for (const child of removed) { + child.removeFromParent(); + } + }, [node.name, sceneInstance]); const collisionPosition = useMemo(() => { if (node.name === "terrain") return position;