fix(map): add world plane collision and respawn

This commit is contained in:
Tom Boullay
2026-05-26 23:52:12 +02:00
parent 0696ca2ae3
commit 665d9f9702
13 changed files with 159 additions and 60 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import * as THREE from "three";
import { useClonedObject } from "@/hooks/three/useClonedObject";
import { useLoggedGLTF } from "@/hooks/three/useLoggedGLTF";
import { useOctreeGraphNode } from "@/hooks/three/useOctreeGraphNode";
import { TerrainBoundaryCollision } from "@/world/collision/TerrainBoundaryCollision";
import { WorldBoundsCollision } from "@/world/collision/WorldBoundsCollision";
import type { MapNode } from "@/types/editor/editor";
import type { OctreeReadyHandler } from "@/types/three/three";
import type { SceneLoadingChangeHandler } from "@/types/world/sceneLoading";
@@ -174,7 +174,7 @@ export function GameMapCollision({
return (
<group ref={groupRef} visible={false}>
{mapReady ? <TerrainBoundaryCollision /> : null}
{mapReady ? <WorldBoundsCollision /> : null}
{mapReady
? collisionNodes.map((mapNode, index) => (
<CollisionErrorBoundary