Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

[help] Positional Tracking Setup #268

Closed methot-ilya-3ds closed 2 years ago

methot-ilya-3ds commented 2 years ago

Context

Using Dissonance Mirror I've attempted to setup the positional audio using the Positional Tracking Documentation

Expected behaviour

I'd like all players to have positional tracking enabled so their voices emanate from their player model.

Actual behaviour

All of my players have the Mirror Player component, however only the local player seems to have the positional tracking enabled. image

v8.1.0

Unity 2021.3.5f1

martindevans commented 2 years ago

Could you post a screenshot of the inspector for a remote player and the DissonanceComms component when you're running the scene (make sure they're both taken from the same session, so the IDs are the same).

methot-ilya-3ds commented 2 years ago

So I think I needed to update the server build - which i've done. Both players are now reading as positional tracking, however the audio seems to be transmitting to the room rather than to the player, since the volume does not decrease as I manually move the speaking player away from the other player.

Is there additional setup that needs to be done using the PlaybackPrefab?

martindevans commented 2 years ago

When you send voice (to a room or to a player) you can choose if the voice is positional in the VoiceBroadcastTrigger by toggling this option. If you're sending through several channel at once voice will be non-positional if any of them are non-positional.

Also make sure that the playback prefab you are using has a volume falloff curve that matches what you expect.

methot-ilya-3ds commented 2 years ago

First of all thank you for the help.

Secondly, I've enabled positional audio in the Dissonance Comms object and set the Dissonance Comms Playback Prefab.

However, I don't seem to see the Playback Prefab being instantiated anywhere in the scene. I'm assuming that its supposed to be parented to the player objects as they join but this does not seem to be the case.

methot-ilya-3ds commented 2 years ago

Got it working - I can see that the audio source was spawning within the Dissonance Audio object. Changing the 3D audio settings in that spawned Audio Source did the trick!