Game Development Reference
In-Depth Information
Drawing paths
Drawing each path uses the same
DebugUtilities_DrawPath
helper function we've
used previously:
Sandbox.lua
:
local function _DrawPaths()
for index, agent in pairs(_agents) do
-- Draw the agent's cyclic path, offset slightly
above the
-- level geometry.
DebugUtilities_DrawPath(
agent:GetPath(), false, Vector.new(0, 0.02, 0));
Core.DrawSphere(
agent:GetTarget(), 0.1, DebugUtilities.Red,
true);
end
end