How do i render and detect a line of sight?

Posted by acidzombie24 on Stack Overflow See other posts from Stack Overflow or by acidzombie24
Published on 2010-04-23T05:07:22Z Indexed on 2010/04/23 5:13 UTC
Read the original article Hit count: 136

Filed under:
|
|

If you look at the top right you'll see on a radar an enemy unit line of sight.

I was wondering what is the most efficient or easiest way (little code, fairly accurate. doesnt need to be perfect) to detect if something is in your line of sight? I may or may not need to render it (i likely wont).

I dont know the formula nor used any math libs/namespaces in C#

alt text

© Stack Overflow or respective owner

Related posts about math

Related posts about c#