Originally Posted by
Chac
can anyone exlpain the "3d draw" function to me?
Do you mean draw3d? Draw3d is a hook that is called when the 3d objects are drawn. You can use the functions:
draw_capsule(x,y,z,length,radius,rotx,roty,rotz),
draw_sphere(x,y,z,radius) and
draw_box(x,y,z,width,height,depth)
in this function to draw 3d objects on the screen. Look in worldbuilder.lua to see it used in practice or here's a quick example
do
local function on3d()
draw_sphere(0,0,1,1)
end
add_hook("draw3d", "draw3dtest", on3d)
end