I have been playing with the ability to detect when the mouse cursor collides or enters a box (building) and when the box is placed between the mouse cursor and various objects (characters).
The attached program allows you to move 5 objects with the cursor keys. Movement of the mouse draws connecting lines and indicates which object's 'line of sight' is blocked by the building.
For you gamers, there may be some helpful stuff in this small demo. This has helped me...I thought it might be helpful to some of you.