Commit 130d74c0 authored by VAN TOLL Wouter's avatar VAN TOLL Wouter
Browse files

Bugfix in TtcaDca::GetCost().

parent 82b560d5
...@@ -88,7 +88,7 @@ float TtcaDca::GetCost(const Vector2D& velocity, Agent* agent, const WorldBase * ...@@ -88,7 +88,7 @@ float TtcaDca::GetCost(const Vector2D& velocity, Agent* agent, const WorldBase *
const Vector2D& relVelocity = neighbor.GetVelocity() - velocity; const Vector2D& relVelocity = neighbor.GetVelocity() - velocity;
// ignore neighbors that are behind the agent; the original Dutra method uses rendering, and agents always face forward // ignore neighbors that are behind the agent; the original Dutra method uses rendering, and agents always face forward
if (angle(relVelocity, agent->getVelocity()) > viewingAngleHalf_) if (angle(relPos, agent->getVelocity()) > viewingAngleHalf_)
continue; continue;
// there is adaptation only if relative velocity is not zero // there is adaptation only if relative velocity is not zero
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment