Update first-person navigation controller with telemetry support

This commit is contained in:
2026-04-11 19:05:05 +02:00
parent 44070f06c6
commit 5be9a08044

View File

@@ -3,6 +3,7 @@ import { Euler } from "three";
import type { Vec3 } from "../core/vector"; import type { Vec3 } from "../core/vector";
import { import {
createPlayerControllerTelemetry,
FIRST_PERSON_PLAYER_SHAPE, FIRST_PERSON_PLAYER_SHAPE,
cloneFirstPersonPlayerShape, cloneFirstPersonPlayerShape,
getFirstPersonPlayerEyeHeight getFirstPersonPlayerEyeHeight
@@ -15,6 +16,8 @@ import {
createIdleRuntimeLocomotionState, createIdleRuntimeLocomotionState,
stepPlayerLocomotion stepPlayerLocomotion
} from "./player-locomotion"; } from "./player-locomotion";
import { createEmptyRuntimeMovementTransitionSignals } from "./player-controller-telemetry";
import type { PlayerControllerTelemetry } from "./navigation-controller";
import type { import type {
NavigationControllerDeactivateOptions, NavigationControllerDeactivateOptions,
NavigationController, NavigationController,
@@ -105,6 +108,9 @@ export class FirstPersonNavigationController implements NavigationController {
private pointerLocked = false; private pointerLocked = false;
private suppressNextPointerLockError = false; private suppressNextPointerLockError = false;
private initializedFromSpawn = false; private initializedFromSpawn = false;
private previousTelemetry: PlayerControllerTelemetry | null = null;
private latestJumpStarted = false;
private latestHeadBump = false;
activate(ctx: RuntimeControllerContext): void { activate(ctx: RuntimeControllerContext): void {
this.context = ctx; this.context = ctx;