- Documentation
- Client functions
- dxDrawWiredSphere
Function
dxDrawWiredSphere
Draws a wire sphere in the world (for debugging, e.g. a zone range). It is drawn on the screen, so it shows through walls.
Syntax
bool dxDrawWiredSphere(float x, y, z, float radius [, int color = tocolor(255, 0, 0, 64), float lineWidth = 1, int iterations = 1])Arguments
x, y, zfloat- Centre.
radiusfloat- Radius in metres.
colorint, optional = tocolor(255, 0, 0, 64)- Colour.
lineWidthfloat, optional = 1- Line thickness.
iterationsint, optional = 1- Mesh density 1-4.
Returns
true.
Example
addEventHandler("onClientRender", root, function()
dxDrawWiredSphere(2495, -1687, 13.5, 30, tocolor(0, 255, 0, 120), 1, 2)
end)
See also
dxDrawLine3DDraws a line between two world points: projects them onto the screen and joins them. It only draws when both ends are on screen and is not hidden by buildings.createColSphereCreates a sphere-shaped collision zone. The zone is invisible; when a player enters or leaves it,onColShapeHit/onColShapeLeavefire (server) oronClientColShapeHit/onClientColShapeLeave(client). A zone can be attached to an element (attachElements) so it moves with it.