OdinRoom.setPositionScale
On this page
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
Name | Type | Description |
---|---|---|
scale | number | The new scaling factor to use. |
Returns
Type | Description |
---|---|
void |