From c7c785ad2ae17cb8de2d9bb38229b69f91c0c292 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:05:58 +0900 Subject: [PATCH] Update heya.ts --- packages/frontend/src/world/room/heya.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/world/room/heya.ts b/packages/frontend/src/world/room/heya.ts index b0432c9951..839500fa29 100644 --- a/packages/frontend/src/world/room/heya.ts +++ b/packages/frontend/src/world/room/heya.ts @@ -220,7 +220,20 @@ export class SimpleHeyaManager extends HeyaManager { const pillarRoot = this.pillarRoots[type]; const pillarOptions = options.pillars[type]; - pillarRoot.setEnabled(pillarOptions.show); + let isEnabled = pillarOptions.show; + if (!isEnabled) { + // 梁同士が直交することは許さない(z-fightingが発生する)ので柱を強制追加 + if (type === 'nw') { + isEnabled = options.walls.n.withHari && options.walls.w.withHari; + } else if (type === 'ne') { + isEnabled = options.walls.n.withHari && options.walls.e.withHari; + } else if (type === 'sw') { + isEnabled = options.walls.s.withHari && options.walls.w.withHari; + } else if (type === 'se') { + isEnabled = options.walls.s.withHari && options.walls.e.withHari; + } + } + pillarRoot.setEnabled(isEnabled); const targetMaterial = this.pillarMaterials[type];