Bumping this 'cause...

This is an actual script and it works in real-time and doesn't lag that much(500MHz with 8mb video RAM). All I need to do is invert the polygon(and work in the light climbing up the wall bit).
I'd actually be able to add an option that would let you change the accuracy of the check. That way people with slower computers would be able to sacrifice the accuracy of it and still have gameplay, while people with faster computers will be able to have more accurate checks.