fixed navigation in demo

This commit is contained in:
Mikulas Florek 2021-03-23 21:41:36 +01:00
parent 2fad7d86a9
commit 9528554513

View file

@ -960,7 +960,7 @@ struct NavigationSceneImpl final : NavigationScene
for (auto iter = m_agents.begin(), end = m_agents.end(); iter != end; ++iter) {
Agent& agent = iter.value();
if (agent.zone.isValid()) continue;
if (agent.zone.isValid() && agent.agent >= 0) continue;
const Vec3 pos = Vec3(inv_zone_tr.transform(m_universe.getPosition(agent.entity)));
if (pos.x > min.x && pos.y > min.y && pos.z > min.z