The use of 3D sounds can really bring your 3D lessons to life adding an extra layer of immersion.
A 3D sound can be set to sound louder as you are closer to the source and quieter as you get further away.
Drag your audio file into the storyboarder from the asset panel and dereference a CreateSound node.
You can save the sound to a variable using the SaveTo node on a variable of type SceneSound.
Now you can manipulate this variable to control your 3D sound properties during the lesson.
A 3D sound has several different properties that can all be used in the same manner.
Just call your 3D sound variable and dereference the property you wish to manipulate.
You can change this properties value by using changeTo and fill in the parameter slot with the constant you wish to change it to. You can also use the increment and decrement nodes to increase or decrease its value by a specified amount.
Just like a 2D sound you will need to dereference a play node from it in order to get it to play.
Max Distance: Is the distance (float) at which the player will no longer hear the 3D sound.
Min Distance: Is the distance (float) at which the sound will start to Rolloff.
RollOffMode: Is the rate at which the sound will dissipate for the player as they move away from it. This property takes a value of type SoundRollOffModes which can dereference two property nodes:
Volume: The volume (float) of the sound at it's source location.
Loop : Takes a boolean value on whether it should loop the sound or play one shot.
Position: Set the origin of the sound with a vector3.