Description
The AgentStepSize
property defines the maximum height that an agent can climb, effectively determining the step height that the agent can navigate over. This property is crucial for ensuring that agents can traverse environments with varying elevations without getting stuck or unable to proceed.
Usage
Use the AgentStepSize
property to configure the step height capability of agents navigating the environment. This is particularly useful in scenarios where the terrain includes steps or small ledges that agents need to climb over.
To set this property, simply assign a float
value representing the maximum step height the agent can climb:
NavMesh navMesh = new NavMesh();
navMesh.AgentStepSize = 0.5f; // Set the step size to 0.5 units
Example
// Example of setting the AgentStepSize property
NavMesh navMesh = new NavMesh();
navMesh.AgentStepSize = 0.5f; // Set the step size to 0.5 units
// This configuration allows agents to climb steps up to 0.5 units high.