Top down line of sight

When playing with a top down view, you usually remove the ceiling but now you can see what is on the other side of the wall. I want to try and stop this.
How can I black out stuff not visible?

http://www.youtube.com/watch?v=Tj5NV0sVtQE

Or a quick mspaint version.
[img_thumb]http://localhostr.com/files/dAorwdw/lineofsight.png[/img_thumb]

To be honest I’d only be doing to world brushes, not props but same difference.

completely misunderstood this

Some sort of omni-directional raycasting.

Could probably do it with the Surface library?

I’d look into doing something like this:

You could but there probably isn’t an efficient and “fast” way to do it.

yeah good luck doing this without lagging lol

You could for most models assume that they are a simple cube, which would allow you to do this by calculating the volume of the “shadowed” area from the cube and rendering it to the stencil

i think there is a way to get the width and height of an object. hold on

can’t find it yet, it has some ridiculous name

What you could do is the following.

Trace upwards the player and get the distance to the ceiling, then use any position between the ceiling and the player and use clipping planes.