Question by
Estecka · Jul 28, 2018 at 08:53 PM ·
audiosourcerolloff
Manually evaluating an AudioSource's Rolloff
I am trying to get the Rolloff curve of an AudioSource, in order to evaluate its rolloff at an arbitrary distance.
I found AudioSource.GetCustomCurve()
, but it will return a wrong curve if the source's rolloff mode isn't set to custom. I could potentially calculate a linear rolloff by myself, but I have no idea how the Logarithmic rollof works.
Is there a built-in way to get the rolloff curve/evaluate the rolloff regardless of the mode ? Else, how can I calculate a logarithmic rolloff ?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612171731im_/https://answers.unity.com/themes/thub/images/avi.jpg)