Fairly new to programming; Need ideas on how to do this script
I wanted to make a small horror game this week (A small challenge because my friends think that I couldn't make a scary game in one week) and I had the following idea: When the enemy gets near you, your camera / player view gets distorted or glitchy. Problem is: I have no idea on how to approach this... If anyone could help me I would be so thankful! And my audio source that I have attached to the enemy basically works, gets louder the nearer it is to the player, but when I move the view, the sound is always the same volume on both ears. Does anyone know how to make the sound get louder on the right side than the left side when the sound is on your right? So that you can hear where the enemy is coming from, not only how far it is away from you?
Answer by leonardo_f-almeida · Sep 05, 2017 at 12:07 AM
If you take a look at the AudioSource component you will see a variable called Stereo Pan, with this you can adjust the sound in a stereo way (left or right) https://docs.unity3d.com/ScriptReference/AudioSource-panStereo.html
Your answer
Follow this Question
Related Questions
How to mute sounds that are coming from game objects not in camera 1 Answer
My Camera turns black in the game playback at some unknown point! (HDR & Adaptive Reinhard Bug) 0 Answers
camera to mouse position problem 0 Answers
Mising shader UnityStandardAssets.ImageEffects.DepthOfField 2 Answers
CRT Shader how optimize?! 1 Answer