- Home /
Drawing projected area which a camera sees
Greetings,
I'm having quite a hard time coming up with a solution to this problem.
What I need is to get a close percentage representation of the covered area of a camera in a room. What I'm doing is dividing this room's floor in cells and then trying to project the camera coverage on these, and then calculate the percentage of covered projected area (all of the described process until here is mandatory to be done this way). To achieve this I'm raycasting many rays from the camera and then projecting the hitpoints on the floor. This has lead me to the conclusion though that much of my projected area is actually full of holes, because of how small my floor grid is and how few rays I can shoot (because of actual hardware limitations, even though I have a pretty good pc...).
Is there any other, more clever, way to achieve this? I really need raycasts, I think, because there are walls in my room and I need to take them into account.
Your answer
![](https://koobas.hobune.stream/wayback/20220612162219im_/https://answers.unity.com/themes/thub/images/avi.jpg)