Component · ai
Perceiver
An AI's senses: a sight cone with peripheral vision, hearing and memory.
Fields
sightRange
f32Sight range in metres inside the cone.
default 25m0 – 10000
fov
f32Full field of view in degrees.
default 120deg0 – 360
peripheralRange
f32Range in metres outside the cone (peripheral awareness); 0 disables.
default 2m0 – 1000
eyeHeight
f32Eye height above the feet in metres.
default 1.7m0 – 100
hearing
f32Hearing multiplier applied to every noise radius.
default 10 – 100
occlusion
f32Noise radius multiplier when the sound path is occluded.
default 0.50 – 1
memory
f32Seconds a memory survives after the last stimulus.
default 8s0 – 3600
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=Perceiver --why "Add Perceiver"Set a field
ara do property.set -p entity=name:Crate -p path=Perceiver.sightRange -p value=25 --why "Tune Perceiver"In a scene document
{
"Perceiver": {
"sightRange": 25
}
}From C#
/// <summary>Give a lookout a longer sight range.</summary>
public static void UsePerceiver(Entity entity, in Tick tick)
{
ref var component = ref World.Get<Perceiver>(entity);
component.SightRange = 30f;
}From C#
Scripts read and write it with Get<Perceiver>(); see the Perceiver struct.