# Line of Sight Algorithm

**URL:** <https://forum.kirupa.com/t/line-of-sight-algorithm/211384>\
**Category:** design\
**Created:** [December 31, 2006, 5:43am UTC](https://forum.kirupa.com/t/line-of-sight-algorithm/211384 "2006-12-31T05:43:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [December 31, 2006, 5:43am UTC](https://forum.kirupa.com/t/line-of-sight-algorithm/211384/1 "2006-12-31T05:43:58Z")

</div>

My bro does game programming and those that know basic vector math and stuff may find this very cool (all created using the dot product, and solving for line intersection).

Click on it first and use Arrow Keys.  
[http://www.sirisian.templarian.com/flash/frontface.htm](http://www.sirisian.templarian.com/flash/frontface.htm)  
He says its unoptimized code, but it runs fine on mine (it does any shapes not just squares).

[whisper]I don’t understand it, he just gets bored and opens flash.[/whisper]
