From 56c60e3761e7580f2b4208675364a49f8963fc97 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 15 Apr 2026 02:04:23 +0200 Subject: [PATCH] Simplify interaction enabling logic in RuntimeHost --- src/runtime-three/runtime-host.ts | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index 21f5b806..3a51ab11 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -1632,25 +1632,13 @@ export class RuntimeHost { return; } - if (target.interactionKind === "interactable") { - const interactable = - this.runtimeScene.entities.interactables.find( - (candidate) => candidate.entityId === target.entityId - ) ?? null; - - if (interactable !== null) { - interactable.interactionEnabled = enabled; - } - return; - } - - const sceneExit = - this.runtimeScene.entities.sceneExits.find( + const interactable = + this.runtimeScene.entities.interactables.find( (candidate) => candidate.entityId === target.entityId ) ?? null; - if (sceneExit !== null) { - sceneExit.interactionEnabled = enabled; + if (interactable !== null) { + interactable.interactionEnabled = enabled; } }