Water sounds

Updated on November 7, 2016 in [A] Audio
Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on Reddit0
2 on November 6, 2016

so I’m proceduraly generating landscape with water in the form of lakes and ponds some of which to large for a single audio source. I want there to be water sounds around them but the only thing I can think of is to have raycasts on the player test for water around him then move an audio source to the raycasts. I don’t have a lot of experience with audio so if anyone knows of a better way before I try to code this in the morning please let me know.

Basically I’d just have raycasts in an octagon around the player and move the audio source to the average location of all of them that hit water.

  • Liked by
Reply
0 on November 6, 2016

I think you solution is fine.
Unless it’s on mobile, raycasts aren’t that expensive.
What you could do instead of raycasting is looking at your map data to see if there’s water.

  • Liked by
Reply
Cancel
0 on November 7, 2016

this is what I came up with the sphere is the audio sorce.

https://www.youtube.com/watch?v=_9YCBpDZpNM&feature=youtu.be

  • Liked by
Reply
Cancel