Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Poor spatialization if listener is scaled in unity #63

Open
taridyn opened this issue Aug 3, 2019 · 1 comment
Open

Poor spatialization if listener is scaled in unity #63

taridyn opened this issue Aug 3, 2019 · 1 comment

Comments

@taridyn
Copy link

taridyn commented Aug 3, 2019

For reference, this is in Unity 2019.1.12 I have included a demo scene at link:
https://drive.google.com/open?id=1zhzeQpw67VfHFkX3uztN5hurCrcLJIo-

And a video of the sound distortion here:
https://www.youtube.com/watch?v=Gyc2fzxrzII&feature=youtu.be
You'll need to wear headphones.

Short version, when the camera object (and listener) is scaled up, the spatializer has this weird hick up when the camera is around 120 degree left or right. To see your self, open the scene, and hit key 1. This will play a sound from behind. Then take the camera, and pan it left or right (just use the editor, i dont have any keys set up), around 120 degrees, you will hear the error. This only happens if the camera is scaled up. If I set scale to 1, it works fine. Let me know if you need any more info.

A fix I found was just to move the listener to a separate game object (that doesn't change scale) and have it just follow the camera, i.e.

void Update()
{
    soundFollower.rotation = camera.rotation;
    soundFollower.position = camera.position;
}

So, not a critical bug, as there is an easy work around, but it took me like 2 hours to track down what the problem was.

@JonOlive
Copy link

i suspect this is related to the issue I raised here #46 relating to object directivity over a year ago...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants