2025-04-18 21:42:38 +02:00

29 lines
464 B
Lua

local width = 1
local distance = 10
local init = false
local x = 0
local y = 0
local z = 0
function drawGrid(pass, y)
pass:setColor(0, 1, 0)
for i=-0.5,0.5,0.05 do
pass:line(x+width*i, y-0.1, z, x, y-0.1, z-distance)
end
end
function lovr.draw(pass)
if not init and lovr.headset.isTracked('head') then
x, y, z = lovr.headset.getPosition('head')
init = true
end
drawGrid(pass, y)
pass:circle(x, y-0.1, z-distance, 0.05, 0, 0, 0, 1, 'fill')
end