draw on the terrain, in this case to mark units
what i tried:
http://springrts.com/wiki/Lua_OpenGL_Ap ... Primitives
Code: Select all
function widget:DrawScreen()
for i in pairs(builders) do
local x,y,z=Spring.GetUnitPosition (i)
gl.DrawGroundCircle (x,y,z, 100, 100,10) --a r=100 circle
gl.DrawGroundQuad (x-50,z-50, x+50,z+50) --a 100x100 square
end
end
The circles and square are not on the units, dont look like circles or squares. Also they seem to draw on the screen like an GUI element and not on the terrain: when moving the camera, they stay in place.
what i am doing wrong:
your turn