Skip to main content

odin_room_set_position_scale

Sets the scaling factor for coordinates supplied to

odin_room_update_position

, facilitating adaptation to your game's unique coordinate system requirements. Peers are visible to each other only within a unit circle of radius 1.0. When altering a peer's position, ensure the position is scaled such that the maximum distance remains one or less. This scaling can be performed manually or by specifying the multiplicative scale here.

info

It's crucial to maintain consistent scaling across all client applications.

Declaration
OdinReturnCode odin_room_set_position_scale(OdinRoomHandle room, float scale);

Parameters

room

Handle of the room (

OdinRoomHandle

) for which the position scale will be set.

Declaration
OdinRoomHandle room;

scale

The scale factor for spatial audio positions.

Declaration
float scale;

Returns

A return code indicating success or failure. See

OdinReturnCode

for more information.

Return Type
OdinReturnCode