playMaker

Author Topic: Sound positioning/panning problem  (Read 1290 times)

Neikke

  • Full Member
  • ***
  • Posts: 134
Sound positioning/panning problem
« on: October 13, 2017, 09:59:24 AM »
Currently, all sfx sounds in my side-scrolling game are quite low (volume wise) and have distinct panning or let's say prominent 2d positioning in game which I don't need. For example when I pick a coin in the left corner of the screen for example, the sound is being shifted to the left speaker and is quite low - while I want it to be centered evenly as it's just a side scroller type of game.

Since I use "Play Sound" action which has position variable, theoretically, I can create a global variable with Camera position and feed it to Play Sound's position variable slot but I'm not sure this it the best way. Any help would be highly appreciated!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Sound positioning/panning problem
« Reply #1 on: October 14, 2017, 03:57:51 AM »
Hi,
Use 'audio play simple' and have an audio source on a gameobject and set the Spatial Blend to 2D.

You can find 'audio play simple' on the EcoSystem
The difference with the official action is that you can choose to wait for end of clip or not. (in the official it will wait till the end of the clip, which you don't want in many cases)

Play audio creates an gameoject with a audio source every time it is triggered and destroys it after sound has ended.
This is more 'Expensive' and can leave garbage.

Play audio is good if you only need to play a sound once or twice in your game.