dtCrowd::addAgent

Adds a new agent to the crowd.

Windows
MacOS
Linux

References

Module

Navmesh

Header

/Engine/Source/Runtime/Navmesh/Public/DetourCrowd/DetourCrowd.h

Include

#include "DetourCrowd/DetourCrowd.h"

Source

/Engine/Source/Runtime/Navmesh/Private/DetourCrowd/DetourCrowd.cpp

Syntax

int addAgent
(
    const float * pos,
    const dtCrowdAgentParams & params,
    const dtQueryFilter * filter
)

Remarks

Adds a new agent to the crowd.

The agent's position will be constrained to the surface of the navigation mesh.

Returns

The index of the agent in the agent pool. Or -1 if the agent could not be added.

Parameters

Parameter

Description

pos

The requested position of the agent. [(x, y, z)]

params

The configutation of the agent.

filter

[UE4] query filter used by agent

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss