From fbfbb8cbaff8c9b599fc417b414676a4b6636cd5 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Mon, 11 Mar 2024 08:49:32 +0100 Subject: [PATCH] Fix focus change --- Runtime/Tools/Scripts/InteractionModule.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Runtime/Tools/Scripts/InteractionModule.cs b/Runtime/Tools/Scripts/InteractionModule.cs index 1c818ea..e081cd8 100644 --- a/Runtime/Tools/Scripts/InteractionModule.cs +++ b/Runtime/Tools/Scripts/InteractionModule.cs @@ -112,7 +112,7 @@ namespace Passer { // This is not working, because Unity may set this to the wrong object autonomously //touchedObject = data.pointerCurrentRaycast.gameObject; //if (touchedObject == null) {// object is a 3D object, as we do not use Physicsraycaster, use the focusObject - touchedObject = focusObject; + touchedObject = focusObject; //} DebugLog("Touch " + touchedObject); @@ -121,8 +121,10 @@ namespace Passer { focusing = true; return; - } + else + ProcessFocus(); + if (!clicking) { // first activation touchedObject = data.pointerCurrentRaycast.gameObject; if (touchedObject == null) // object is a 3D object, as we do not use Physicsraycaster, use the focusObject