Add collision detection methods in runtime-host.ts

This commit is contained in:
2026-04-11 18:36:07 +02:00
parent 871a0d4edc
commit e2403f00d4

View File

@@ -241,6 +241,19 @@ export class RuntimeHost {
motion,
shape
) ?? null,
probePlayerGround: (feetPosition, shape, maxDistance) =>
this.collisionWorld?.probePlayerGround(
feetPosition,
shape,
maxDistance
) ?? {
grounded: false,
distance: null,
normal: null,
slopeDegrees: null
},
canOccupyPlayerShape: (feetPosition, shape) =>
this.collisionWorld?.canOccupyPlayerShape(feetPosition, shape) ?? true,
resolvePlayerVolumeState: (feetPosition) =>
this.resolvePlayerVolumeState(feetPosition),
resolveThirdPersonCameraCollision: (