dxDrawLine3D
Client
Draws a line in the 3D world for one frame. The line faces the camera.
bool dxDrawLine3D(float startX, startY, startZ, float endX, endY, endZ [, color color = tocolor(255, 255, 255), float width = 1, string|bool stage = postfx])
Parameters
| Name | Type | Description |
|---|---|---|
| startX, startY, startZ | float | Start point in the world. A vec3 also works. |
| endX, endY, endZ | float | End point in the world. A vec3 also works. |
| color | color | Colour, a tocolor value.default tocolor(255, 255, 255) |
| width | float | Thickness.default 1 |
| stage | string|bool | When to draw: prefx, postfx or postgui, or a boolean (true means postgui).default postfx |
Returns
true once the drawing is queued.
Example
addEventHandler("onClientRender", root, function()
local pos = getElementPosition(localPlayer)
dxDrawLine3D(pos.x, pos.y, pos.z, pos.x, pos.y, pos.z + 3, tocolor(255, 0, 0), 4)
end)Note
prefx and postfx draw the same way: only postgui changes the layer.