An Audio Component effect that simulates sound attenuation based on the orientation of the transform relative to the AudioListenerComponent.

// @input Component.AudioComponent audio

var spatialAudio = script.audio.spatialAudio;
var directivityEffect = spatialAudio.directivityEffect;
directivityEffect.enabled = true;
directivityEffect.shapeDecay = 10;
directivityEffect.shapeFactor = 0.5;
interface DirectivityEffect {
    enabled: boolean;
    shapeDecay: number;
    shapeFactor: number;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

enabled: boolean

Whether the audio directivity effect is applied or not.

shapeDecay: number

The width of main lobe.

shapeFactor: number

A ratio that specifies the shape of pattern directivity from omnidirectional(0) to cardioid (1.0).

Methods

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean