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

Set nearclip plane for UI raycasting #153

Merged
merged 2 commits into from
May 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Submodules/SDK
Submodule SDK updated from 10b068 to 69c83c
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