Developer Documentation
Our new developer documentation is now available. Please check it out!

OdinRoom.setPositionScale

public setPositionScale(scale: number): void

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.

Parameters

NameTypeDescription
scalenumberThe new scaling factor to use.

Returns

TypeDescription
void