playMaker

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

Neikke

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Sound positioning/panning problem
« on: October 13, 2017, 06: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: 4304
    • View Profile
    • jinxtergames
Re: Sound positioning/panning problem
« Reply #1 on: October 14, 2017, 12: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.