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
- Spatial center point of the sound isolation zone. This parameter is an array of length 3, representing the coordinates in the forward, right, and up directions.
- forward
- Unit vector in the forward direction from
position. This parameter is an array of length 3 representing the coordinates in the forward, right, and up directions. - right
- Unit vector in the right direction from
position. This parameter is an array of length 3 representing the coordinates in the forward, right, and up directions. - up
- Unit vector in the upward direction from
position. This parameter is an array of length 3 representing the coordinates in the forward, right, and up directions. - forwardLength
- Treating the sound isolation zone as a cube, this represents the length of the forward edge, in game engine units.
- rightLength
- Treating the sound isolation zone as a cube, this represents the length of the right edge, in game engine units.
- upLength
- Treating the 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]:
- 0: Broadcast mode. Volume and timbre do not attenuate with distance.
- (0,0.5): Weak attenuation. 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 (default is 1). Volume and timbre attenuate rapidly.