Lens Scripting API

    Enumeration DistanceCurveType

    The curve that specifies how sound fades with the distance from Audio Component to the Audio Listener.****

    // @input Component.AudioComponent audio
    var spatialAudio = script.audio.spatialAudio;
    var distanceEffect = spatialAudio.distanceEffect;
    distanceEffect.type = Audio.DistanceCurveType.Linear;
    Index

    Enumeration Members

    Inverse: number

    Inverse Curve ~ y(x) = (a/x)+b

    InverseLogarithm: number

    Inverse Logarithmic Curve ~ +log(x)

    Linear: number

    Linear Curve ~ y(x) = ax+b

    Logarithm: number

    Logarithmic Curve ~ -log(x)

    MMNEPVFCICPMFPCPTTAAATR