auto-git:

[add] src/geometry/model-instance-collider-generation.ts
 [add] src/runtime-three/rapier-collision-world.ts
 [change] AGENTS.md
 [change] CHAT_CONTEXT.md
 [change] architecture.md
 [change] package.json
 [change] prompts-lite.txt
 [change] prompts.txt
 [change] roadmap.md
 [change] src/assets/model-instances.ts
 [change] src/document/migrate-scene-document.ts
 [change] src/document/scene-document-validation.ts
 [change] src/document/scene-document.ts
 [change] src/runtime-three/first-person-navigation-controller.ts
 [change] src/runtime-three/navigation-controller.ts
 [change] src/runtime-three/runtime-host.ts
 [change] src/runtime-three/runtime-scene-build.ts
 [change] src/runtime-three/runtime-scene-validation.ts
 [change] src/viewport-three/viewport-host.ts
 [change] testing.md
This commit is contained in:
2026-04-04 07:51:38 +02:00
parent d82e37861e
commit 3d1dd3fe63
20 changed files with 1553 additions and 31 deletions

View File

@@ -2,7 +2,7 @@ import { Euler, Vector3 } from "three";
import type { Vec3 } from "../core/vector";
import { FIRST_PERSON_PLAYER_SHAPE, resolveFirstPersonMotion } from "./player-collision";
import { FIRST_PERSON_PLAYER_SHAPE } from "./player-collision";
import type { NavigationController, RuntimeControllerContext } from "./navigation-controller";
const LOOK_SENSITIVITY = 0.0022;
@@ -116,17 +116,22 @@ export class FirstPersonNavigationController implements NavigationController {
this.verticalVelocity -= GRAVITY * dt;
const resolvedMotion = resolveFirstPersonMotion(
const resolvedMotion = this.context.resolveFirstPersonMotion(
this.feetPosition,
{
x: horizontalX,
y: this.verticalVelocity * dt,
z: horizontalZ
},
FIRST_PERSON_PLAYER_SHAPE,
this.context.getRuntimeScene().colliders
FIRST_PERSON_PLAYER_SHAPE
);
if (resolvedMotion === null) {
this.updateCameraTransform();
this.publishTelemetry();
return;
}
this.feetPosition = resolvedMotion.feetPosition;
this.grounded = resolvedMotion.grounded;