diff --git a/src/main.js b/src/main.js index 7927abc..1522cbf 100644 --- a/src/main.js +++ b/src/main.js @@ -1593,6 +1593,14 @@ async function renderRoom(room) { tileMesh.position.z = originPos.z + (worldHeight / 2) - (CONFIG.CELL_SIZE / 2); tileMesh.position.y = 0; + // Random rotation for 4x4 rooms to add variety + if (tileDef.id.includes('room_4x4')) { + const rotations = [0, Math.PI / 2, Math.PI, Math.PI * 1.5]; + const randomRotation = rotations[Math.floor(Math.random() * rotations.length)]; + tileMesh.rotation.z = randomRotation; + console.log(`[DEBUG] Room ${room.id} rotated ${(randomRotation * 180 / Math.PI).toFixed(0)}°`); + } + console.log(`[DEBUG] renderRoom ${room.id} | MeshPos:`, tileMesh.position); scene.add(tileMesh);