Version: 2021.3
public float lowpassResonanceQ ;

描述

确定滤波器的自共振衰减程度。

低通共振品质越高表明能量损失速度越慢,即振荡消失得越慢。

低通共振品质值(范围从 1.0 至 10.0)。默认值为 1.0。

using UnityEngine;

[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioLowPassFilter))] public class Example : MonoBehaviour { // Moves the Lowpass Resonance Quality Factor from 0 to 10 following a Sinus function // Attach this to an audio source with a LowPassFilter to listen to it working.

void Update() { GetComponent<AudioLowPassFilter>().lowpassResonanceQ = (Mathf.Sin(Time.time) * 5 + 5); } }

Did you find this page useful? Please give it a rating: