draw_point3d(VECTOR* pos, COLOR* color, var alpha, var size)
Writes a point - a colored square - at a given position in the level, mostly for testing
/
debugging
purposes.
Parameters:
pos |
XYZ position in the level |
color |
BGR color vector that determines the point color |
alpha |
Transparency, from 0 (full transparent) to 100 (opaque) |
size |
Point size in quants |
Remarks:
- The point is only visible during the next frame. For displaying it
permanently, use a while ... wait(1) loop.
- Every point is using a particle, so adjust max_particles if you need
many points.
-
For drawing a 2D point at a xy position on the screen, use draw_quad.
Speed:
Fast
Example:
// display all vertices on a model mesh
action show_my_vertices()
{
var i;
while(1) {
i = ent_vertices(my);
var pos[3];
while (i > 0) {
draw_point3d(vec_for_vertex(pos,my,i),COLOR_RED,100,5);
i -= 1;
}
wait(1);
}
}
See also:
draw_line, draw_line3d,
draw_quad
► latest
version online