Sunday 27 June 2010

Footstep sound system

Whilst in the bath, I had an ingenious idea, lets represent sound areas by bounding boxes within 3ds max. When loading them in we can just read the texture name for the mesh and if it is either one of these: (and has SOUNDMARKER in the title):

 METAL,
 SQUIDGY,
 CARPET,
 ROCK,
 WATER,
 WOOD,
 ICE,
 MARBLE,
 GRASS,
 DIRT

Then we can set it to not be added to the collision mesh and also do not render it. Instead there is a simple point within AABB (Axis Aligned Bounding Box) check to see if the player is within one of these boxes. Then the correct sound can be played

Well its all implemented now, who would know it would all be this easy, now time to add footstep sounds.

No comments:

Post a Comment