From 0a609ce083e2b1a35006dc0cb06e6ea1305dee1e Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 18 Jan 2024 12:15:39 +0100 Subject: [PATCH] Exclude screen space UI elements from world interaction --- Runtime/Tools/Scripts/InteractionModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/Tools/Scripts/InteractionModule.cs b/Runtime/Tools/Scripts/InteractionModule.cs index 314a224..7e94c32 100644 --- a/Runtime/Tools/Scripts/InteractionModule.cs +++ b/Runtime/Tools/Scripts/InteractionModule.cs @@ -561,8 +561,9 @@ namespace Passer { private new RaycastResult FindFirstRaycast(System.Collections.Generic.List raycastResults) { foreach (RaycastResult result in raycastResults) { - if (result.isValid) + if (result.isValid && result.worldPosition != Vector3.zero) { return result; + } } return new RaycastResult(); }