Set Encoder Position
Sets the 3D position of the encoder for the given channels. The server uses positions to cull audio between peers that are too far apart; spatialization itself happens on the receiving client, e.g. with the attenuation of the Odin Synth Component.
- Node type: Callable function. Has execution pins and runs when it is reached in the event graph.
- Target: Odin Encoder
- Menu category: Odin › Audio Pipeline
- C++:
UOdinEncoder::SetPosition
An encoder holds at most 12 channel positions; each masked channel occupies one slot until removed with ClearPosition. Passing a full channel mask (FOdinChannelMask::CreateFull) therefore fails with ODIN_ERROR_AUDIO_POSITION_LIMIT_REACHED. Mask only the channels that are actually transmitted on - for plain voice transmission that is just channel 0.
The server only forwards audio to peers whose positions are within a distance of 1.0 of each other, so coordinates must be scaled such that 1.0 equals the intended hearing range (e.g. divide unreal world units by the distance where the client side attenuation reaches silence). Unscaled world coordinates put peers out of range of each other and the server forwards no audio at all.
Inputs
| Name | Type | Description |
|---|---|---|
| Target | Odin Encoder | The Odin Encoder to call this function on. |
| Channel Mask | Odin Channel Mask | The channels to set the position for, e.g. from Create Channel Mask from Enabled. Mask only the channels you transmit on. |
| Position | Odin Position | 3D position. |
Outputs
| Name | Type | Description |
|---|---|---|
| Return Value | Boolean | True if position was set. |