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

@@ -3007,14 +3007,19 @@ export class ViewportHost {
rotationDegrees: Vec3,
size: Vec3
) {
const contactBounds: GeneratedColliderBounds[] = [];
const contactBounds: Parameters<typeof collectWaterContactPatches>[1] = [];
for (const brush of Object.values(document.brushes)) {
if (brush.id === excludedBrushId || brush.volume.mode !== "none") {
continue;
}
contactBounds.push(getBoxBrushBounds(brush));
contactBounds.push({
kind: "orientedBox",
center: brush.center,
rotationDegrees: brush.rotationDegrees,
size: brush.size
});
}
for (const modelInstance of getModelInstances(document.modelInstances)) {