M MY Multiplayer: Wiki
Side
Kind

dxDrawMaterialLine3D

Client

Draws an image stretched along a line in the 3D world for one frame.

bool dxDrawMaterialLine3D(float startX, startY, startZ, float endX, endY, endZ, texture|dui material, float width [, bool flipUV = false, color color = tocolor(255, 255, 255), string|bool stage = postfx, float faceTowardX, faceTowardY, faceTowardZ = nil])

Parameters

NameTypeDescription
startX, startY, startZfloatStart point in the world, the top of the image. A vec3 also works.
endX, endY, endZfloatEnd point in the world, the bottom of the image. A vec3 also works.
flipUVboolFlip the image. Can be left out.default false
materialtexture|duiThe image: a texture, render target, screen source or dui.
widthfloatWidth of the strip, in world units.
colorcolorColour multiplied with the image, a tocolor value.default tocolor(255, 255, 255)
stagestring|boolWhen to draw: prefx, postfx or postgui, or a boolean (true means postgui).default postfx
faceTowardX, faceTowardY, faceTowardZfloatPoint the image's face turns to. Without it, the image faces the camera. A vec3 also works.default nil

Returns

true once the drawing is queued.

Example

local sign = engineCreateTexture("images/sign.png")

addEventHandler("onClientRender", root, function()
    dxDrawMaterialLine3D(2488, -1666, 16, 2488, -1666, 14, sign, 2)
end)
Noteprefx and postfx draw the same way: only postgui changes the layer.

See also