rojo/.cursor/rules/roblox/reference/engine/enums/RollOffMode.yaml
2026-02-02 12:08:47 -06:00

56 lines
2.1 KiB
YAML

# This file is automatically generated. Please don't edit it manually.
# To submit a bug report on the content, see
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
name: RollOffMode
type: enum
summary: |
How `Class.Sound|Sounds` parented to a `Class.BasePart` or `Class.Attachment`
attenuate (fade out) as the distance between the listener and the parent
increases.
description: |
Enum which determines how `Class.Sound|Sounds` parented to a `Class.BasePart`
or `Class.Attachment` attenuate (fade out) as the distance between the
listener and the parent increases.
code_samples: []
tags: []
deprecation_message: ''
items:
- name: Inverse
summary: |
Volume attenuates from `Class.Sound.RollOffMinDistance` in an inverse
manner, mirroring how sounds attenuate in the real world. This is done
through `Class.Sound.RollOffMinDistance`/`distance`, where `distance` is
the `Datatype.Vector3.Magnitude` between the audio source and the audio
listener.
value: 0
tags: []
deprecation_message: ''
- name: Linear
summary: |
Volume attenuates between `Class.Sound.RollOffMinDistance` and
`Class.Sound.RollOffMaxDistance` with a linear relationship. This is done
through
(`Class.Sound.RollOffMaxDistance`/`distance`)/(`Class.Sound.RollOffMaxDistance`-`Class.Sound.RollOffMinDistance`),
where `distance` is the `Datatype.Vector3.Magnitude` between the audio
source and the audio listener.
value: 1
tags: []
deprecation_message: ''
- name: LinearSquare
summary: |
Volume attenuates between `Class.Sound.RollOffMinDistance` and
`Class.Sound.RollOffMaxDistance` with a linear squared relationship. This
is done through squaring `Linear`.
value: 2
tags: []
deprecation_message: ''
- name: InverseTapered
summary: |
A hybrid model which follows the `Inverse` model when close to
`Class.Sound.RollOffMinDistance` and the `LinearSquare` model when close
to `Class.Sound.RollOffMaxDistance`. This is done by taking the lesser of
`Inverse` and `LinearSquare`.
value: 3
tags: []
deprecation_message: ''