update: add a physic scenne

This commit is contained in:
2026-04-17 10:48:18 +02:00
parent b26da614f0
commit ed7681a293
23 changed files with 2052 additions and 218 deletions
+1 -3
View File
@@ -3,13 +3,11 @@ import { useThree } from "@react-three/fiber";
import { PlayerCamera, PLAYER_EYE_HEIGHT } from "@/world/player/PlayerCamera";
import { PlayerController } from "@/world/player/PlayerController";
const SPAWN_POSITION = { x: 0, y: PLAYER_EYE_HEIGHT, z: 0 };
export function PlayerComponent(): React.JSX.Element {
const camera = useThree((state) => state.camera);
useEffect(() => {
camera.position.set(SPAWN_POSITION.x, SPAWN_POSITION.y, SPAWN_POSITION.z);
camera.position.set(0, PLAYER_EYE_HEIGHT, 0);
}, [camera]);
return (