Description
The Height
property of the NavMeshAgent
class represents the height of the agent in the navigation mesh. This property is used to define the physical dimensions of the agent, which can affect how it navigates through the environment, particularly in areas with varying elevation or obstacles.
Usage
To set or get the height of a NavMeshAgent
, you can use the Height
property. This property is a float
and can be adjusted to fit the specific needs of your agent's navigation requirements.
Example usage:
NavMeshAgent agent = new NavMeshAgent();
agent.Height = 2.0f; // Set the height of the agent to 2 units
float currentHeight = agent.Height; // Retrieve the current height of the agent
Example
NavMeshAgent agent = new NavMeshAgent();
agent.Height = 2.0f; // Set the height of the agent to 2 units
float currentHeight = agent.Height; // Retrieve the current height of the agent