Game Development Reference
In-Depth Information
Sensing - hearing
The hearing we'll implement is one of the more basic models you can have. It's not as dir-
ect as vision, and requires a different approach. We'll assume that hearing is defined by
hearingRange , and that the hearing ability has a linear fall off to that radius. We'll also
assume that the sound emits something (in this case, footsteps), the volume of which is rel-
ative to the object's velocity. This would make sense in a stealth game, where sneaking
should emit less sound than running. Sound is not blocked by obstacles or modified in any
other way, apart from the distance between the target and the listener.
Search WWH ::




Custom Search