Game Development Reference
In-Depth Information
Has move position evaluator
The
HasMovePosition
evaluator calculates whether the agent is within 1.5 meters of
its target position. This allows for agents to terminate their move behaviors once they've
reached their target position:
SoldierEvaluators.lua
:
function SoldierEvaluators_HasMovePosition(userData)
return userData.movePosition ~= nil and
(Vector.Distance(
userData.agent:GetPosition(),
userData.movePosition) > 1.5);
end