Constructor
new Vec3D(px, py, pzopt, useFloatsopt)
Creates a new instance of the Vec3D class.
The useFloats parameter can be used to force the API to send the coordinates as floating point values when setting the user position (see the SetUserPositionRequest class) 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 | Attributes | Default | Description |
|---|---|---|---|---|
px | number | The position along the X axis. | ||
py | number | The position along the Y axis. | ||
pz | number | <optional> | 0 | The position along the Z axis. |
useFloats | boolean | <optional> | false | Force the coordinates to be sent as floating point values to the server. |
Members
(readonly) isFloat :boolean
Indicates whether the position is expressed using floating point values.
Type:
- boolean
px :number
Position along the X axis.
Type:
- number
py :number
Position along the Y axis.
Type:
- number
pz :number
Position along the Z axis.
Type:
- number
Methods
toString() → {string}
Returns a string containing the x, y and z coordinates.
Returns:
The string representation of the Vec3D object.
- Type:
- string