#Make a sound come from a "line" in space

1 messages · Page 1 of 1 (latest)

autumn hawk
#

I want to add a river to my scene, and I want it to have a sound of rushing water coming from it. But, I don't want the sound to come from a single spot in the world - I want the sound to always come from where the closest point on the river is relative to the listener.

Should I just constantly move the source relative to the player, or is there another way?

#

Make a sound come from a "line" in space

lavish smelt
#

Well, in real world sounds don't generally uniformly come from all points of a river, it's a mix of sounds from specific points where the water hits something.

But you could also attach the stream player to the player node and have it move around player based on direction to the river

autumn hawk
#

hmm yeah that's what I was thinking of, I was hoping there would be a more "correct" way

#

but if I'm already moving the audio with the player, what would be a good way to design it?

lavish smelt
#

Maybe using a remote transform

autumn hawk
#

what's that?

lavish smelt
#

I guess could also just spawn the player on closest point on the river, but then would need to think about what happens when you move around

autumn hawk
#

I think the river should store multiple lines that describe its shape, then the player could find the closest point on that line to the character's position, and place the audio there

#

as for how to get the closest point, I'm gonna have to do some research...