wip mission 2

This commit is contained in:
math-pixel
2026-05-11 16:46:22 +02:00
parent 32d644b09d
commit f7b968abe7
19 changed files with 449 additions and 94 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ import {
PLAYER_XZ_DAMPING_FACTOR,
} from "@/data/playerConfig";
import { InteractionManager } from "@/stateManager/InteractionManager";
import { GameStepManager } from "@/stateManager/GameStepManager";
import { useGameStore } from "@/stores/gameStore";
import type { Vector3Tuple } from "@/types/3d";
type Keys = {
@@ -64,7 +64,7 @@ export function PlayerController({
const velocity = useRef(new THREE.Vector3());
const onFloor = useRef(false);
const wantsJump = useRef(false);
const gameStepManager = GameStepManager.getInstance();
const canMove = useGameStore((state) => state.canMove);
const capsule = useRef(
new Capsule(
@@ -167,7 +167,7 @@ export function PlayerController({
}, []);
useFrame((_, delta) => {
if (!gameStepManager.canMove()) {
if (!canMove) {
velocity.current.set(0, 0, 0);
camera.position.copy(capsule.current.end);
return;