From eb07818f130ec0e6b0b29d9928d9d0cd2dafabbd Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sun, 7 Mar 2021 20:58:09 +0100 Subject: [PATCH] Ignore agents without bounding boxes --- components/detournavigator/navigatorimpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/detournavigator/navigatorimpl.cpp b/components/detournavigator/navigatorimpl.cpp index c47cf97662..142ba590d2 100644 --- a/components/detournavigator/navigatorimpl.cpp +++ b/components/detournavigator/navigatorimpl.cpp @@ -18,6 +18,8 @@ namespace DetourNavigator void NavigatorImpl::addAgent(const osg::Vec3f& agentHalfExtents) { + if(agentHalfExtents.length2() <= 0) + return; ++mAgents[agentHalfExtents]; mNavMeshManager.addAgent(agentHalfExtents); }