How can I use a 3-D `Camera` in a 2-D top-down game?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By nolan

I’m trying to create a 2-D top-down game with a rich audio experience. It’s looking like I’ll need to sync 3-D audio nodes with 2-D positions and rotations to get the richness I want. Unfortunately, it also looks like I’ll need a 3-D camera as a parent of the listener for audio to play. But I’m happy with the top-down view of a 2-D viewport/camera. So what is the least intrusive way to add a 3-D camera to a 2-D world? Essentially I’d be happy if it didn’t render anything–I’m just using it to make the listener play audio.

One thing I’m concerned about: I think I can use an orthogonal perspective to still get the top-down view of my 2-D world. But then I’m worried that the listener will perceive the audio from that perspective, rather than from the perspective of the player. So for instance, in an Asteroids-like shooter, the player would hear asteroids/bullets/ship movement as if they’re looking down onto it, not from the perspective of the ship as it turns, moves, etc. I want the latter, even though I’m visually displaying the former.

Thanks for any help.

It can be a bit difficult to find stuff in the docs sometimes, but the viewports tutorial has a section for Listeners, and the Worlds section has a link to 2D-in-3D and 3D-in-2D demo projects. Is any of that helpful?

But for clarification, why do you need 3D audio nodes to get the “richness” you want? I would think that the only difference between 2D and 3D audio nodes would be the sense of depth or distance (along the Z-axis, that is), which most 2D games…don’t really emphasize if they have it at all.

jhigginbotham64 | 2019-10-18 00:53