Sign in to follow this  
Jahn Bledwards

3D Sound problem

Recommended Posts

Jahn Bledwards    106
I'm trying to use 3D sound in my game, but I'm running into a problem. Whenever a player creates a sound, like a footstep or a gunshot, the sound will play "behind" the player, because the player is moving away from the sound. How can I make it so that the sound plays "on" the player? I am using DirectSound.

Share this post


Link to post
Share on other sites
Jiia    592
Well, you would keep updating the position of the sound with the player. But that kinda makes the idea of 3D sounds pointless, doesn't it? I assume you're talking about a first person game? I don't think this is what you wanna do.

In real life, your feet don't hit the ground exactly under your center point as you walk or run. Try puting the sound about 1 to 2 feet (in game scale) in front of the character position.

Gunfire should work the same way. The character is holding the weapon in front of him. Surely the speed he moves would not make him reach the gun's position before the sound finished?

If you're actually talking about looping sounds, then yeah, you need to do keep updating the position of the sound. But I would still leave it in front of the player a bit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this