This is my code for drawling the line.
--- is just spaces ignore them
function raycast(fromx,fromy)
---cam.angle += 1
---local l = cam.dist
---local atx=fromx+(lcos(cam.angle))
---local aty=fromy+(lsin(cam.angle))
---line(fromx,fromy,atx,aty,8)
end
I can't see why this isn't working. im changing the cam.angle but the line is still straight

And there's no rad function so I do not know..

1


Angles in PICO-8 use a system where a rotation of 1 unit is 1 COMPLETE rotation, so the reason it's not visually changing is that you're rotating it back to the same end position every time.
[Please log in to post a comment]