• Opsive has been nominated for TWO Unity Awards: Publisher of the Year and Best Development Tool (Behavior Designer Pro)! Your support means everything, cast your vote here: https://awards.unity.com/vote

[Bug] BDPro Sound Sense

Tempest

New member
So I'm not sure if it's used in Dots, but in the CanDetectObject using Sound at line 25 in sound.cs
m_AudibilityThreshold does nothing, after searching through the whole project code that variable is never used.
Should this not be used on line 80 like this
if (targetSoundLevel > m_AudibilityThreshold){ // loudestAudioLevel) {

Also I think the GetSoundLevel math is wrong,
What I did was to insert a debug.log line at 112 to get the float being returned as TargetSoundLevel as well as the distance
So the sound level being returned at/near a certain distance doesn't seem to match up with the
Logarithmic curve, maybe I'm bing a little dense with this part, so some insight would be helpful.
as you can see in the pics,
at around 10 distance I'm getting a targetSoundLevel of 0.0053
but looking at the curve, I'm expecting to get a targetSoundLevel of something around 0.1-0.2

Thanks in advance
 

Attachments

  • Screenshot 2025-06-13 at 08.33.07.png
    Screenshot 2025-06-13 at 08.33.07.png
    52.3 KB · Views: 2
  • Screenshot 2025-06-13 at 08.33.34.png
    Screenshot 2025-06-13 at 08.33.34.png
    65 KB · Views: 2
Good catch, I'll take a closer look with the next round of updates and let you know on the curve.
 
Back
Top