From 72f87665d4b09799f68a92dee205445e60c5bc37 Mon Sep 17 00:00:00 2001 From: parax0 Date: Wed, 16 Dec 2015 19:43:21 -0700 Subject: [PATCH] Allow coplanar ray intersections (fixes an issue with the ray hit node not matching what's visibly on top in the viewport) --- src/Core/CRayCollisionTester.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/CRayCollisionTester.cpp b/src/Core/CRayCollisionTester.cpp index fb473a9b..84e3940e 100644 --- a/src/Core/CRayCollisionTester.cpp +++ b/src/Core/CRayCollisionTester.cpp @@ -59,7 +59,7 @@ SRayIntersection CRayCollisionTester::TestNodes(const SViewInfo& ViewInfo) if (MidResult.Hit) { - if ((!Result.Hit) || (MidResult.Distance < Result.Distance)) + if ((!Result.Hit) || (MidResult.Distance <= Result.Distance)) Result = MidResult; } }