SpatialAudioZone

Sound isolation zone settings.

export class SpatialAudioZone {
  zoneSetId?: number;
  position?: number[];
  forward?: number[];
  right?: number[];
  up?: number[];
  forwardLength?: number;
  rightLength?: number;
  upLength?: number;
  audioAttenuation?: number;
}

Properties

zoneSetId
ID of the sound isolation zone.
position
The spatial center point of the sound isolation zone. This parameter is an array of length 3, representing coordinates in the forward, right, and up directions respectively.
forward
Unit vector pointing forward from position. This parameter is an array of length 3, representing coordinates in the forward, right, and up directions respectively.
right
Unit vector pointing right from position. This parameter is an array of length 3, representing coordinates in the forward, right, and up directions respectively.
up
Unit vector pointing upward from position. This parameter is an array of length 3, representing coordinates in the forward, right, and up directions respectively.
forwardLength
Treating the entire sound isolation zone as a cube, this represents the length of the forward edge, in game engine units.
rightLength
Treating the entire sound isolation zone as a cube, this represents the length of the right edge, in game engine units.
upLength
Treating the entire sound isolation zone as a cube, this represents the length of the upward edge, in game engine units.
audioAttenuation
Sound attenuation coefficient when users inside and outside the sound isolation zone communicate. Value range: [0,1]. Where:
  • 0: Broadcast mode, volume and timbre do not attenuate with distance; the local user hears no change regardless of distance.
  • (0,0.5): Weak attenuation mode; volume and timbre attenuate slightly, allowing sound to travel farther than in real environments.
  • 0.5: Simulates real-world volume attenuation, equivalent to not setting audioAttenuation.
  • (0.5,1]: Strong attenuation mode (default is 1); volume and timbre attenuate rapidly.