add: physics in game scene

This commit is contained in:
Tom Boullay
2026-05-08 01:17:35 +01:00
parent 96796bca65
commit 861a369776
4 changed files with 28 additions and 1 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
import { useState } from "react";
import { Physics } from "@react-three/rapier";
import type { Octree } from "three/addons/math/Octree.js";
import {
PLAYER_SPAWN_POSITION_GAME,
@@ -43,7 +44,9 @@ export function World(): React.JSX.Element {
<>
<GameMusic />
<GameMap onOctreeReady={setOctree} />
<GameStageContent />
<Physics>
<GameStageContent />
</Physics>
</>
) : (
<TestMap onOctreeReady={setOctree} />