An Audio Component effect that allows the Lens to simulate sound based on the direction of the Audio Listener relative to the Audio Component.

// @input Component.AudioComponent audio
var spatialAudio = script.audio.spatialAudio;

var positionEffect = spatialAudio.positionEffect;
positionEffect.enabled = true;
interface PositionEffect {
    enabled: boolean;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

enabled: boolean

If enabled, the position effect will be applied.

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