Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Set nearclip plane for UI raycasting (#153)
Browse files Browse the repository at this point in the history
* ensure our nearClipPlane is set correctly instead of just asserting about it

* updated sdk checkout
  • Loading branch information
StephenHodgson authored May 3, 2019
1 parent d4be873 commit a23dfa4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Services/InputSystem/FocusProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit a23dfa4

Please sign in to comment.