The OdinRoom class. Use createRoom from OdinClient instance to create a room. The OdinRoom requires a token to connect
to a room. OdinClients handles token creation for you, so its easier to just use OdinClient for room creation.
Typical procedure is to create an OdinClient instance with an access key and call its createRoom function to create
a room with a name and for a user id. Then add event listeners to the room and call join to connect to the room.
Creates a new instance of a room with a token. Use OdinClient if you don’t want to manage tokens yourself. Important: Don’t use this function directly, use OdinClient instead.
Sets the scaling factor for coordinates supplied to updatePosition, 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. Note: It’s crucial to maintain consistent scaling across all client applications.
Updates the three-dimensional position of the current peer in this room. The server utilizes the provided coordinates to perform automatic culling among peers in the same room, based on unit circles with a radius of 1.0. This feature is particularly beneficial in scenarios involving a large number of peers within the same room, enabling peers to interact or ‘see’ each other only when in close proximity. To modify the distance sensitivity for position updates, use setPositionScale. Note: Use this before calling join to set the initial peer position upon connect.