Skip to content

Commit

Permalink
[Unity] Fix incorrect evaluation of logarithmic distance curve.
Browse files Browse the repository at this point in the history
Fixes: #343
  • Loading branch information
lakulish committed Apr 26, 2024
1 parent 2d367a3 commit 627f38c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public static float EvaluateDistanceCurve(float distance, IntPtr userData)
case AudioRolloffMode.Logarithmic:
if (distance < rMin)
return 1.0f;
else if (distance < rMax)
else if (distance > rMax)
return 0.0f;
else
return rMin / distance;
Expand Down

0 comments on commit 627f38c

Please sign in to comment.