entities - display on overlay
This commit is contained in:
@@ -52,7 +52,7 @@ function Project:isOnScreen(x, y, d) -- determines if something is visible
|
||||
return (x >= 1 and x - getCharSize(d) < self.cx) and (y >= 1 and y - getCharSize(d) < self.cy)
|
||||
end
|
||||
|
||||
function Project:draw(meta, b, text, color)
|
||||
function Project:drawPoints(meta, pts, text, color)
|
||||
local yaw = math.rad(meta.yaw)
|
||||
local pitch = math.rad(meta.pitch)
|
||||
|
||||
@@ -72,6 +72,7 @@ function Project:draw(meta, b, text, color)
|
||||
return newx,newy,newz
|
||||
end
|
||||
|
||||
for _, b in pairs(pts) do
|
||||
local x,y,z = rotate(b.x - meta.x, -b.y + meta.y, b.z - meta.z)
|
||||
local d = math.sqrt(x * x + y * y + z * z)
|
||||
|
||||
@@ -89,5 +90,6 @@ function Project:draw(meta, b, text, color)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return Project
|
||||
|
||||
Reference in New Issue
Block a user