Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · navigation

NavAgentType

A named agent type: its own baked mesh (dimensions) and traversal costs. Agents select it through NavAgent.profile == profile.

Fields

profile

u32
Mesh profile ID shared by the type's agents and its bake.
default 0

name

string
Inspector name (Humanoid, Brute, Drone).
default ""

radius

f32
Bake radius in metres.
default 0.3m0.01 – 10

height

f32
Bake clearance height in metres.
default 1.8m0.1 – 100

climb

f32
Maximum step height in metres.
default 0.4m0 – 10

slope

f32
Steepest walkable slope in degrees.
default 45deg0 – 89

areaCosts

list<f32>
Cost multiplier per area ID (index 0..15); missing entries are 1.
default []

areaMask

u16
Areas this type may enter (one bit per area).
default 65535

Usage

Every edit is an undoable command: from the CLI as below, or the same JSON from an agent over MCP. See component.add and property.set.

Add it

ara do component.add -p entity=name:Crate -p component=NavAgentType --why "Add NavAgentType"

Set a field

ara do property.set -p entity=name:Crate -p path=NavAgentType.profile -p value=0 --why "Tune NavAgentType"

In a scene document

{
  "NavAgentType": {
    "profile": 0
  }
}

From C#

/// <summary>Configure a navigation profile for low steps.</summary>
public static void UseNavAgentType(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<NavAgentType>(entity);
    component.Climb = 0.5f;
}

From C#

Scripts read and write it with Get<NavAgentType>(); see the NavAgentType struct.