Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camera position as avatar position VS avatar position as camera position #77

Open
zsawyer opened this issue Aug 23, 2021 · 1 comment
Open

Comments

@zsawyer
Copy link

zsawyer commented Aug 23, 2021

Hi,

The camera position and orientation seems to be the basis for the local calculation of positional sound (your audio space origin if you will - or target/ears) while the avatar positions are the sources of the sound (mouth).

I have noticed that you are using the camera position as the avatar position.

This can cause a glitch when the user is using a 3rd person view as the camera position is offset to the avatar.
The glitch would present itself as the source of the sound being some ghost location namely the camera position while one would expect the avatar to be the source of the sound.

I am not sure if player.getCameraPosVec will actually return the camera position or the avatar position. But the name suggest camera.

I am accutally doing the exact opposite in the forge mod: avatar position as camera position
https://github.com/zsawyer/MumbleLink/blob/7f0873ac16579fd37f1adb356ddf37ab56afbc31/mod/src/main/java/zsawyer/mods/mumblelink/mumble/UpdateData.java#L149

I have decided this because this case only matters in 3rd person view. And it was still intuitive when I see another avatar right side of my avatar that I would hear the sounds coming in on my right ear - even if from camera perspective it should be front.

I would like to hear your reasoning behind doing it the other way around.

Regards,
Z

@zsawyer
Copy link
Author

zsawyer commented Aug 23, 2021

Should we switch to what the mumble devs intended and actually use camera and avatar positions correctly?

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

No branches or pull requests

1 participant