dxDrawLine3D
Cliente
Dibuja una línea en el mundo 3D durante un fotograma. La línea mira a la cámara.
bool dxDrawLine3D(float startX, startY, startZ, float endX, endY, endZ [, color color = tocolor(255, 255, 255), float width = 1, string|bool stage = postfx])
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| startX, startY, startZ | float | Punto inicial en el mundo. También acepta un vec3. |
| endX, endY, endZ | float | Punto final en el mundo. También acepta un vec3. |
| color | color | Color, un valor de tocolor.por defecto tocolor(255, 255, 255) |
| width | float | Grosor.por defecto 1 |
| stage | string|bool | Cuándo dibujar: prefx, postfx o postgui, o un booleano (true es postgui).por defecto postfx |
Retorno
true si el dibujo quedó en cola.
Ejemplo
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)Atención
prefx y postfx dibujan igual: solo postgui cambia la capa.