[SOLVED] Making Audio Sources Exempt from World Positioning

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
WalterMays
Prole
Posts: 2
Joined: Thu Mar 08, 2018 6:49 pm

[SOLVED] Making Audio Sources Exempt from World Positioning

Post by WalterMays » Sun Mar 18, 2018 8:05 pm

I'm working on a game where I play both music and sound effects. Some effects should be placed "in the world," while others should be played at regular volume (e.g. sound effects for menu screens). Music should never be placed in the world. How can I make some sounds exempt from having their volume and stereo properties modified?
Last edited by WalterMays on Sun Mar 18, 2018 10:35 pm, edited 1 time in total.

User avatar
raidho36
Party member
Posts: 1678
Joined: Mon Jun 17, 2013 12:00 pm

Re: Making Audio Sources Exempt from World Positioning

Post by raidho36 » Sun Mar 18, 2018 10:11 pm

You can play them in the same location as your sound listener. Using "setRelative" function will make the source track the listener.
Last edited by raidho36 on Sun Mar 18, 2018 10:12 pm, edited 1 time in total.

User avatar
zorg
Party member
Posts: 2306
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Making Audio Sources Exempt from World Positioning

Post by zorg » Sun Mar 18, 2018 10:12 pm

Also, stereo sources won't really be affected anyway.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

WalterMays
Prole
Posts: 2
Joined: Thu Mar 08, 2018 6:49 pm

Re: Making Audio Sources Exempt from World Positioning

Post by WalterMays » Sun Mar 18, 2018 10:34 pm

raidho36 wrote:
Sun Mar 18, 2018 10:11 pm
You can play them in the same location as your sound listener. Using "setRelative" function will make the source track the listener.
That's exactly what I needed! I set the position to the position of the player, but if the player was moving it wouldn't work correctly. Thank you so much! That solved my problem.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Morfeu and 12 guests