diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index 497b2657..d9205c80 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -2752,7 +2752,30 @@ export class RuntimeHost { z: feetPosition.z - playerShape.size.z * 0.5 }, max: { - x: feetPosition.x + pla({ + x: feetPosition.x + playerShape.size.x * 0.5, + y: feetPosition.y + playerShape.size.y, + z: feetPosition.z + playerShape.size.z * 0.5 + } + }; + } + } + + private collectRuntimeStaticWaterContactPatches( + brush: RuntimeBoxBrushInstance + ) { + const contactBounds: Parameters[1] = []; + + if (this.runtimeScene === null) { + return contactBounds; + } + + for (const collider of this.runtimeScene.colliders) { + if (collider.kind === "trimesh" && collider.source === "brush") { + if (collider.brushId === brush.id) { + continue; + } + + contactBounds.push({ kind: "triangleMesh", vertices: collider.vertices, indices: collider.indices,