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
| Name | Type | Description |
|---|---|---|
| startX, startY, startZ | float | Start point in the world, the top of the image. A vec3 also works. |
| endX, endY, endZ | float | End point in the world, the bottom of the image. A vec3 also works. |
| flipUV | bool | Flip the image. Can be left out.default false |
| material | texture|dui | The image: a texture, render target, screen source or dui. |
| width | float | Width of the strip, in world units. |
| color | color | Colour multiplied with the image, a tocolor value.default tocolor(255, 255, 255) |
| stage | string|bool | When to draw: prefx, postfx or postgui, or a boolean (true means postgui).default postfx |
| faceTowardX, faceTowardY, faceTowardZ | float | Point 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)Note
prefx and postfx draw the same way: only postgui changes the layer.