AudioPathArea3D¶
Keeps a SpatialReflectionNavigationAgent3D's fill inside shapes you size in the editor, such as the rooms of a
building. Optional: without one, the agent fills its whole range.
Inherits: Area3D
Script: addons/spatial_audio_extended/audio_path_area_3d.gd
Set it up¶
- Add an
AudioPathArea3Das a child of the agent - Add a
CollisionShape3Dto it and pick a box, sphere, cylinder or capsule - Size the shape with its handles to cover the rooms the sound can travel through
Add more shapes for rooms that don't fit one box, such as an L-shaped hall.
For a source that moves, put the area in the level instead and assign it to the agent's path_area. A child area
moves with the source, and the agent fills the space again each time a shape moves.
How it works¶
The agent fills the space around the source with small cells. Cells outside every shape count as solid, so the fill stops at the shape's edge, and spends no time on open ground or rooms the sound never reaches.
- Inside the area, sound travels around corners as usual
- Outside it, the sound isn't routed and only occlusion applies
- Moving or resizing a shape while the game runs fills the space again
- The fill range still applies, so the fill stops at whichever comes first
Only the shapes are used. A new AudioPathArea3D has monitoring off and sits on no physics layers, so it doesn't
trigger anything else in your game.
Shapes¶
| Shape | Used |
|---|---|
BoxShape3D |
Yes |
SphereShape3D |
Yes |
CylinderShape3D |
Yes |
CapsuleShape3D |
Yes |
| Convex, concave, height map and others | No, skipped |
Disabled shapes are skipped too.
Methods¶
| Method | Description |
|---|---|
has_point(point: Vector3) -> bool |
True when a point in world space is inside one of the area's shapes |
Warnings¶
The scene tree warns when the area has no shape it can use, or has shapes it skips.