Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · audio

AcousticPortal

An opening (door, window, archway) connecting two zones. An empty zone name is outdoors.

Fields

a

string
First zone's name; empty means outdoors.
default ""

b

string
Second zone's name; empty means outdoors.
default ""

position

vec3
World-space center of the opening, supplied by the bridge.
default [0,0,0]m

width

f32
Opening width.
default 1m0.01 – 1000

height

f32
Opening height.
default 2m0.01 – 1000

open

f32
How open it is: 0 closed (blocks), 1 fully open. Drive from door state.
default 10 – 1

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=AcousticPortal --why "Add AcousticPortal"

Set a field

ara do property.set -p entity=name:Crate -p path=AcousticPortal.a -p value="" --why "Tune AcousticPortal"

In a scene document

{
  "AcousticPortal": {
    "a": ""
  }
}

From C#

/// <summary>Leave a doorway partly open for sound transmission.</summary>
public static void UseAcousticPortal(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<AcousticPortal>(entity);
    component.Open = 0.75f;
}

From C#

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