LOS

new topic     » topic index » view thread      » older message » newer message

I need a FAST routine that can check "line of sight" between two points.
This is for use in Hayes. I want to track a straight line from a to b, and
if somewhere on the way this line hits the wall, the routine returns 0. Else
it returns 1.

The sequence LEVEL is a 2D sequence, and to see if a given point lies on a
wall, you can do this:

if LEVEL[ypos/20+1][xpos/20+1] then
    -- just hit the wall
end if

Can someone help me with this?

Einar

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu