133 bool init(
void *crowd,
void *navMeshQuery,
bool isValid() const
Returns true if this agent slot is active in the crowd.
void setMaxAcceleration(float accel)
Overrides the agent's maximum acceleration at runtime.
kVec3 getPosition() const
Current world-space position of the agent.
bool isMoving() const
Returns true if the agent is actively moving toward a target.
bool init(void *crowd, void *navMeshQuery, const kVec3 &position, const kNavAgentConfig &config)
Initialises the agent inside an existing dtCrowd.
void setMaxSpeed(float speed)
Overrides the agent's maximum speed at runtime.
kVec3 getVelocity() const
Current world-space velocity of the agent.
void uninit()
Removes the agent from the crowd.
~kNavAgent()
Destroys the agent, releasing internal crowd resources.
float getMaxSpeed() const
Returns the agent's current maximum speed.
int getAgentIndex() const
Returns the internal crowd agent index.
kNavAgent()
Constructs an uninitialised agent; call init() before use.
void stop()
Stops the agent in place.
bool setTarget(const kVec3 &target)
Sets the movement target on the navmesh.
float getMaxAcceleration() const
Returns the agent's current maximum acceleration.
Core type aliases, enumerations, structs, and utility functions used throughout the engine.
Symbol visibility / linkage macro for the Kemena3D library.
#define KEMENA3D_API
Definition kexport.h:35
Top-level Kemena3D engine namespace.
Definition kanimation.h:23
glm::vec3 kVec3
3-component float vector.
Definition kdatatype.h:33
Per-agent parameters passed to dtCrowd on creation.
Definition knavagent.h:24
bool optimizeVis
Optimise path visibility.
Definition knavagent.h:38
bool separation
Enable crowd separation.
Definition knavagent.h:41
float separationWeight
Definition knavagent.h:34
float pathOptRange
Definition knavagent.h:31
float radius
Agent cylinder radius (m).
Definition knavagent.h:25
bool anticipateTurns
Definition knavagent.h:37
bool optimizeTopo
Optimise path topology.
Definition knavagent.h:39
float height
Agent cylinder height (m).
Definition knavagent.h:26
bool obstacleAvoidance
Use local steering avoidance.
Definition knavagent.h:40
float maxAcceleration
Maximum acceleration (m/s²).
Definition knavagent.h:27
float maxSpeed
Maximum speed (m/s).
Definition knavagent.h:28