Game Development Reference
In-Depth Information
if (Agent.GetHealth(userData.agent) <= 0) then
return Action.Status.TERMINATED;
end
path = userData.agent:GetPath();
DebugUtilities_DrawPath(
path, false, Vector.new(), DebugUtilities.Blue);
Core.DrawCircle(
path[#path], 1.5, DebugUtilities.Blue);
if (Vector.Distance(
userData.agent:GetPosition(),
userData.agent:GetTarget()) < 1.5) then
Agent.RemovePath(userData.agent);
return Action.Status.TERMINATED;
end
return Action.Status.RUNNING;
end
When our agents start fleeing from their pursuers, they will now draw a blue path indicat-
ing the position they are fleeing to.
Search WWH ::




Custom Search