Add locomotion state and volume checks to navigation controller
This commit is contained in:
@@ -9,15 +9,26 @@ export interface FirstPersonTelemetry {
|
||||
feetPosition: Vec3;
|
||||
eyePosition: Vec3;
|
||||
grounded: boolean;
|
||||
locomotionState: RuntimeLocomotionState;
|
||||
inWaterVolume: boolean;
|
||||
inFogVolume: boolean;
|
||||
pointerLocked: boolean;
|
||||
spawn: RuntimeSpawnPoint;
|
||||
}
|
||||
|
||||
export type RuntimeLocomotionState = "grounded" | "swimming" | "flying";
|
||||
|
||||
export interface RuntimePlayerVolumeState {
|
||||
inWater: boolean;
|
||||
inFog: boolean;
|
||||
}
|
||||
|
||||
export interface RuntimeControllerContext {
|
||||
camera: PerspectiveCamera;
|
||||
domElement: HTMLCanvasElement;
|
||||
getRuntimeScene(): RuntimeSceneDefinition;
|
||||
resolveFirstPersonMotion(feetPosition: Vec3, motion: Vec3, shape: FirstPersonPlayerShape): ResolvedPlayerMotion | null;
|
||||
resolvePlayerVolumeState(feetPosition: Vec3): RuntimePlayerVolumeState;
|
||||
setRuntimeMessage(message: string | null): void;
|
||||
setFirstPersonTelemetry(telemetry: FirstPersonTelemetry | null): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user