Add player climbing surface resolution logic to RuntimeHost
This commit is contained in:
@@ -236,6 +236,7 @@ import {
|
|||||||
resolvePlayerStartLookInput,
|
resolvePlayerStartLookInput,
|
||||||
resolvePlayerStartPauseInput
|
resolvePlayerStartPauseInput
|
||||||
} from "./player-input-bindings";
|
} from "./player-input-bindings";
|
||||||
|
import { resolvePlayerClimbSurface } from "./player-climbing";
|
||||||
|
|
||||||
interface CachedMaterialTexture {
|
interface CachedMaterialTexture {
|
||||||
signature: string;
|
signature: string;
|
||||||
@@ -972,6 +973,21 @@ export class RuntimeHost {
|
|||||||
},
|
},
|
||||||
canOccupyPlayerShape: (feetPosition, shape) =>
|
canOccupyPlayerShape: (feetPosition, shape) =>
|
||||||
this.collisionWorld?.canOccupyPlayerShape(feetPosition, shape) ?? true,
|
this.collisionWorld?.canOccupyPlayerShape(feetPosition, shape) ?? true,
|
||||||
|
resolvePlayerClimbSurface: (
|
||||||
|
feetPosition,
|
||||||
|
facingDirection,
|
||||||
|
shape,
|
||||||
|
previousSurface
|
||||||
|
) =>
|
||||||
|
this.runtimeScene === null
|
||||||
|
? null
|
||||||
|
: resolvePlayerClimbSurface({
|
||||||
|
runtimeScene: this.runtimeScene,
|
||||||
|
feetPosition,
|
||||||
|
facingDirection,
|
||||||
|
shape,
|
||||||
|
previousSurface
|
||||||
|
}),
|
||||||
resolvePlayerVolumeState: (feetPosition) =>
|
resolvePlayerVolumeState: (feetPosition) =>
|
||||||
this.resolvePlayerVolumeState(feetPosition),
|
this.resolvePlayerVolumeState(feetPosition),
|
||||||
resolveThirdPersonCameraCollision: (
|
resolveThirdPersonCameraCollision: (
|
||||||
|
|||||||
Reference in New Issue
Block a user