Vec3D
The position in a 2D or 3D space.
new Vec3D(px, py[, pz][, useFloats])
Creates a new Vec3D instance.
The position along the Z axis is optional for 2D environments.
The useFloats parameter can be used to force the API send the coordinates as floating point values
when setting the user position (see the SetUserPositionRequest request) or creating an MMORoom.
This must be set accordingly to the server side setting of the MMORoom and consistently through the client.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
px |
|
|
The position along the X axis. |
py |
|
|
The position along the Y axis. |
pz |
|
Yes |
The position along the Z axis. Defaults to |
useFloats |
|
Yes |
Force the coordinates to be sent as floating point values to the server. Defaults to |
Properties
px number
Returns the position along the X axis.
py number
Returns the position along the Y axis.
pz number
Returns the position along the Z axis.