Game Development Reference
In-Depth Information
float distanceFactor = 1f - Math.min(distance,
hearingRange) / hearingRange;
float soundHeard = distanceFactor * noiseEmitted;
7. If the threshold of 0.25f is exceeded, the AI has heard the sound and will react.
Search WWH ::




Custom Search