Method Set3DPosition
Set3DPosition(GameObject, string, bool)
Set the location of the local user for a specific positonail channel. Note: This version of Set3DPosition will use the same position for the user's "ears" and "mouth", making a slightly less accurate version of positional audio.
Declaration
void Set3DPosition(GameObject participantObject, string channelName, bool allowPanning = true)
Parameters
Type | Name | Description |
---|---|---|
Game |
participantObject | The position of the GameObject meant to represent the player |
string | channelName | The name of the specific positional channel to update the position in. Must be a positional channel. |
bool | allowPanning | Manages audio panning (audio shifting between left and right ears). Panning is enabled by default but will be disabled if set to false |
Set3DPosition(Vector3, Vector3, Vector3, Vector3, string, bool)
Set the location of the local user for a specific positional channel.
Declaration
void Set3DPosition(Vector3 speakerPos, Vector3 listenerPos, Vector3 listenerAtOrient, Vector3 listenerUpOrient, string channelName, bool allowPanning = true)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | speakerPos | The position of the virtual "mouth." |
Vector3 | listenerPos | The position of the virtual "ear." |
Vector3 | listenerAtOrient | A unit vector that represents the forward (Z) direction, or heading, of the listener. |
Vector3 | listenerUpOrient | A unit vector that represents the up (Y) direction of the listener. Use Vector3(0, 1, 0) for a "global" up in the world space. |
string | channelName | The name of the specific positional channel to update the position in. Must be a positional channel. |
bool | allowPanning | Manages audio panning (audio shifting between left and right ears). Panning is enabled by default but will be disabled if set to false |