Recast Navigation
Navigation-mesh Toolset for Games
dtCrowdAgentParams Struct Reference

Configuration parameters for a crowd agent. More...

#include <DetourCrowd.h>

Public Attributes

float radius
 Agent radius. [Limit: >= 0]. More...
 
float height
 Agent height. [Limit: > 0]. More...
 
float maxAcceleration
 Maximum allowed acceleration. [Limit: >= 0]. More...
 
float maxSpeed
 Maximum allowed speed. [Limit: >= 0]. More...
 
float collisionQueryRange
 Defines how close a collision element must be before it is considered for steering behaviors. [Limits: > 0]. More...
 
float pathOptimizationRange
 The path visibility optimization range. [Limit: > 0]. More...
 
float separationWeight
 How aggresive the agent manager should be at avoiding collisions with this agent. [Limit: >= 0]. More...
 
unsigned char updateFlags
 Flags that impact steering behavior. (See: UpdateFlags) More...
 
unsigned char obstacleAvoidanceType
 The index of the avoidance configuration to use for the agent. More...
 
unsigned char queryFilterType
 The index of the query filter used by this agent. More...
 
void * userData
 User defined data attached to the agent. More...
 

Description

Configuration parameters for a crowd agent.

See also
dtCrowdAgent, dtCrowd::addAgent(), dtCrowd::updateAgentParameters()

Member Data Documentation

◆ collisionQueryRange

dtCrowdAgentParams::collisionQueryRange

Defines how close a collision element must be before it is considered for steering behaviors. [Limits: > 0].

Collision elements include other agents and navigation mesh boundaries.

This value is often based on the agent radius and/or maximum speed. E.g. radius * 8

◆ height

float dtCrowdAgentParams::height

Agent height. [Limit: > 0].

◆ maxAcceleration

float dtCrowdAgentParams::maxAcceleration

Maximum allowed acceleration. [Limit: >= 0].

◆ maxSpeed

float dtCrowdAgentParams::maxSpeed

Maximum allowed speed. [Limit: >= 0].

◆ obstacleAvoidanceType

dtCrowdAgentParams::obstacleAvoidanceType

The index of the avoidance configuration to use for the agent.

[Limits: 0 <= value <= DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS]

dtCrowd permits agents to use different avoidance configurations. This value is the index of the dtObstacleAvoidanceParams within the crowd.

See also
dtObstacleAvoidanceParams, dtCrowd::setObstacleAvoidanceParams(), dtCrowd::getObstacleAvoidanceParams()

◆ pathOptimizationRange

dtCrowdAgentParams::pathOptimizationRange

The path visibility optimization range. [Limit: > 0].

Only applicable if updateFlags includes the DT_CROWD_OPTIMIZE_VIS flag.

This value is often based on the agent radius. E.g. radius * 30

See also
dtPathCorridor::optimizePathVisibility()

◆ queryFilterType

unsigned char dtCrowdAgentParams::queryFilterType

The index of the query filter used by this agent.

◆ radius

float dtCrowdAgentParams::radius

Agent radius. [Limit: >= 0].

◆ separationWeight

dtCrowdAgentParams::separationWeight

How aggresive the agent manager should be at avoiding collisions with this agent. [Limit: >= 0].

A higher value will result in agents trying to stay farther away from each other at the cost of more difficult steering in tight spaces.

◆ updateFlags

unsigned char dtCrowdAgentParams::updateFlags

Flags that impact steering behavior. (See: UpdateFlags)

◆ userData

void* dtCrowdAgentParams::userData

User defined data attached to the agent.


The documentation for this struct was generated from the following file: