Update water contact patch collection and handling in rendering and runtime modules

This commit is contained in:
2026-04-07 04:58:48 +02:00
parent 30ddb565db
commit 0e4bd01e69
4 changed files with 86 additions and 12 deletions

View File

@@ -100,7 +100,7 @@ function createInverseVolumeRotation(rotationDegrees: Vec3) {
.invert();
}
export function collectWaterContactPatches(volume: OrientedWaterVolume, contactBounds: WaterContactBounds[]): WaterContactPatch[] {
export function collectWaterContactPatches(volume: OrientedWaterVolume, contactBounds: WaterContactSource[]): WaterContactPatch[] {
const inverseRotation = createInverseVolumeRotation(volume.rotationDegrees);
const halfX = Math.max(volume.size.x * 0.5, WATER_CONTACT_EPSILON);
const halfY = Math.max(volume.size.y * 0.5, WATER_CONTACT_EPSILON);