Our new developer documentation is now available. Please check it out!
OdinRoom.updatePosition
On this page
public updatePosition(x: number, y: number, z: number): void
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.
Parameters
Name | Type | Description |
---|---|---|
x | number | The new x position of the peer. |
y | number | The new y position of the peer. |
z | number | The new z position of the peer. |
Returns
Type | Description |
---|---|
void |