From ad46e443a4320605dd364723ef613f7c3c08ec4b Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 22 Apr 2026 17:02:37 +0200 Subject: [PATCH] auto-git: [change] src/runtime-three/runtime-host.ts --- src/runtime-three/runtime-host.ts | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index e1ad8af8..3e05cc4a 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -3129,23 +3129,18 @@ export class RuntimeHost { } private updateUnderwaterSceneFog() { + const cameraVolumeState = this.resolvePlayerVolumeState({ + x: this.camera.position.x, + y: this.camera.position.y, + z: this.camera.position.z + }); const fogTelemetry = this.activeRuntimeCameraRig !== null ? { cameraSubmerged: - this.resolvePlayerVolumeState({ - x: this.camera.position.x, - y: this.camera.position.y, - z: this.camera.position.z - }).waterSurfaceHeight !== null && - resolveWaterContact( - { - x: this.camera.position.x, - y: this.camera.position.y, - z: this.camera.position.z - }, - this.runtimeScene?.volumes.water ?? [] - ) !== null, + cameraVolumeState.inWater && + cameraVolumeState.waterSurfaceHeight !== null && + this.camera.position.y < cameraVolumeState.waterSurfaceHeight, eyePosition: { x: this.camera.position.x, y: this.camera.position.y,