From a23dfa4e2a6c678a119951716cc034919b0b7ee3 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Fri, 3 May 2019 08:03:15 -0700 Subject: [PATCH] Set nearclip plane for UI raycasting (#153) * ensure our nearClipPlane is set correctly instead of just asserting about it * updated sdk checkout --- Services/InputSystem/FocusProvider.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Services/InputSystem/FocusProvider.cs b/Services/InputSystem/FocusProvider.cs index 5291b5e76..525a60b45 100644 --- a/Services/InputSystem/FocusProvider.cs +++ b/Services/InputSystem/FocusProvider.cs @@ -853,7 +853,11 @@ private static void UpdatePointerRayOnHit(RayStep[] raySteps, RaycastHit physics private void RaycastGraphics(IMixedRealityPointer pointer, PointerEventData graphicEventData, LayerMask[] prioritizedLayerMasks, PointerHitResult hitResult) { Debug.Assert(UIRaycastCamera != null, "Missing UIRaycastCamera!"); - Debug.Assert(UIRaycastCamera.nearClipPlane.Equals(0f), "Near plane must be zero for raycast distances to be correct"); + + if (!UIRaycastCamera.nearClipPlane.Equals(0.01f)) + { + UIRaycastCamera.nearClipPlane = 0.01f; + } if (pointer.Rays == null) {