Sound attenuation
Posted: Wed May 30, 2012 3:59 pm
Hi all,
I can't make the sound attenuation system work.
This is what I do :
When I move my entity the volume remain the same.
Any idea ?
Thanks
I can't make the sound attenuation system work.
This is what I do :
Code: Select all
--Setting global sound options
love.audio.setPosition(400, 300, 0)
love.audio.setDistanceModel("exponent")
[...]
--Loading and playing the sound
self.idle_src = love.audio.newSource("res/tank/idle_loop.ogg", "static")
self.idle_src:setLooping(true)
self.idle_src:setDistance(10,100)
self.idle_src:setVolume(0.5)
self.idle_src:setRolloff(0)
self.idle_src:play()
[...]
--Updating sound source position
self.idle_src:setPosition(self.x, self.y, 0)
Any idea ?
Thanks