Fix: Allow clicking through open doors
- Filter invisible doors from raycast intersection tests - Open doors no longer block mouse clicks on tiles behind them - Players can now select and move to tiles visible through open doorways - Fixes issue where opened doors acted as invisible collision barriers for UI interaction
This commit is contained in:
@@ -1385,7 +1385,8 @@ window.addEventListener('pointerdown', (event) => {
|
|||||||
const allDoors = [];
|
const allDoors = [];
|
||||||
Object.values(SESSION.roomMeshes).forEach(roomData => {
|
Object.values(SESSION.roomMeshes).forEach(roomData => {
|
||||||
if (roomData.doors) {
|
if (roomData.doors) {
|
||||||
allDoors.push(...roomData.doors);
|
// Solo incluir puertas visibles (cerradas) en el raycast
|
||||||
|
allDoors.push(...roomData.doors.filter(door => door.visible));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user