DistanceAttenuationMode列挙型(Enum)

列挙型(Enum)日本語解説は準備中

ひとことで言うと

DistanceAttenuationModeは、ロブロックス(Roblox)の列挙型(Enum)です。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):Determines how an AudioEmitter attenuates (fades out) as the distance between the AudioEmitter and an interacting AudioListener increases.

選べる値(5)

名前値説明
Enum.DistanceAttenuationMode.Custom0Uses the developer-supplied Class.AudioEmitter.DistanceAttenuation|DistanceAttenuation curve for gain rolloff.
Enum.DistanceAttenuationMode.InverseTapered1Volume attenuates according to a hybrid model which follows the DistanceAttenuationMode.Inverse model when close to the lower bound of AudioEmitter.DistanceAttenuationBounds and the DistanceAttenuationMode.LinearSquared model when close to the upper bound of AudioEmitter.DistanceAttenuationBounds. This is done by taking the lesser of these two curves, such that the curve mostly follows an inverse relationship but tapers to silence at the maximum distance.
Enum.DistanceAttenuationMode.Linear2Volume attenuates between the bounds of AudioEmitter.DistanceAttenuationBounds with a linear relationship. This is done by computing (maxDistance - distance) / (maxDistance - minDistance), where distance is the Vector3.Magnitude between the AudioEmitter's position and the AudioListener's position.
Enum.DistanceAttenuationMode.LinearSquared3Volume attenuates between the bounds of AudioEmitter.DistanceAttenuationBounds with a linear-squared relationship. This is done by squaring the formula used to determine the volume when using DistanceAttenuationMode.Linear, which creates a parabolic curve with a steeper fade.
Enum.DistanceAttenuationMode.Inverse4Volume attenuates from the lower bound of AudioEmitter.DistanceAttenuationBounds in an inverse manner, mirroring how sounds attenuate in the real world. This is done by computing (minDistance/distance), where distance is the Vector2.Magnitude between the AudioEmitter's position and the AudioListener's position.

英語の説明とメンバーの一覧は、Roblox Creator Documentation(DistanceAttenuationMode)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む