Log In  

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+(l
sin(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..

P#114045 2022-07-07 23:36

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.

P#114049 2022-07-08 04:06

thx

P#114055 2022-07-08 05:54

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 09:00:15 | 0.006s | Q:14