From f216528f407ce48176ceb2fbbeab975c51609fe6 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 26 Mar 2021 15:14:12 +0100 Subject: [PATCH] Tweak comment --- Source/Engine/Navigation/NavMeshRuntime.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Engine/Navigation/NavMeshRuntime.cpp b/Source/Engine/Navigation/NavMeshRuntime.cpp index e6c255782..af5ad0662 100644 --- a/Source/Engine/Navigation/NavMeshRuntime.cpp +++ b/Source/Engine/Navigation/NavMeshRuntime.cpp @@ -126,10 +126,9 @@ bool NavMeshRuntime::FindPath(const Vector3& startPosition, const Vector3& endPo Quaternion invRotation; Quaternion::Invert(Properties.Rotation, invRotation); - // Check for special case, where path has not been found, and starting polygon was the one closest to the target if (pathSize == 1 && dtStatusDetail(findPathStatus, DT_PARTIAL_RESULT)) { - // In this case we find a point on starting polygon, that's closest to destination and store it as path end + // TODO: skip adding 2nd end point if it's not reachable (use navmesh raycast check? or physics check? or local Z distance check?) resultPath.Resize(2); resultPath[0] = startPosition; resultPath[1] = startPositionNavMesh;