Make some noise (with your feet) (InterAction Project Status Update)

The InterAction Project has two different kinds of Player steering modes : One for Adventure-like games and one that is more the classic FPS steering. But despite which is used : You probably need footsteps.

The character controller I am writing for the InterAction Project (which of course does not have to be used) makes use of a set of components that provide foot step sounds, depending on the material the player is walking on.

For now it is supporting only meshes, but the terrain support is nearly done.

If you want to have foot steps while moving on a surface, you simply assign a FeetSoundMaterial component to it. Then you can assing multiple footstep sounds to this Material. Everything else is done by the FeetSoundManager component attached to the player.

The feet sound manager casts a ray down to the surface and retrieves the FeetSoundMaterial. It then takes the AudioClip[] array it gets from the FeetSoundMaterial and plays a random footstep sound IF no other footstep is playing.

Of course this could be done much better. Like a library of footsteps groups and then using the mesh material to select which group to use, just as an example.

But for now this works fine. 😀