Feat/polish-mission1 #12

Merged
math-pixel merged 42 commits from feat/polish-mission1 into develop 2026-06-01 21:51:09 +00:00
Showing only changes of commit 5d2e7e2aab - Show all commits
+16
View File
@@ -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;