How
Sounds parented to a BasePart or Attachment attenuate (fade out) as the distance between the listener and the parent increases.- Items
- 4
- Uses
- 2
Items4
- Volume attenuates from
Sound.RollOffMinDistancein an inverse manner, mirroring how sounds attenuate in the real world. This is done throughSound.RollOffMinDistance/distance, wheredistanceis theVector3.Magnitudebetween the audio source and the audio listener. - Volume attenuates between
Sound.RollOffMinDistanceandSound.RollOffMaxDistancewith a linear relationship. This is done through (Sound.RollOffMaxDistance/distance)/(Sound.RollOffMaxDistance-Sound.RollOffMinDistance), wheredistanceis theVector3.Magnitudebetween the audio source and the audio listener. - Volume attenuates between
Sound.RollOffMinDistanceandSound.RollOffMaxDistancewith a linear squared relationship. This is done through squaringLinear. - A hybrid model which follows the
Inversemodel when close toSound.RollOffMinDistanceand theLinearSquaremodel when close toSound.RollOffMaxDistance. This is done by taking the lesser ofInverseandLinearSquare.