# How to get Occluded Actors without Raycasting

**URL:** <https://forums.unrealengine.com/t/how-to-get-occluded-actors-without-raycasting/1312746>\
**Category:** C++\
**Tags:** occlusion, occlusion-culling, unreal-engine, UE5, Rendering, CPP, question\
**Created:** [September 26, 2023, 12:14pm UTC](https://forums.unrealengine.com/t/how-to-get-occluded-actors-without-raycasting/1312746 "2023-09-26T12:14:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlazingLyric80](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlazingLyric80](https://forums.unrealengine.com/u/BlazingLyric80)\
**Post date:** [September 26, 2023, 12:14pm UTC](https://forums.unrealengine.com/t/how-to-get-occluded-actors-without-raycasting/1312746/1 "2023-09-26T12:14:26Z")

</div>

Hello!

Is there a way to get occluded actors in C++ without ray casting from every camera? I’ve tried numerous approaches, including:

- Was Recently Rendered ([does not tell if an actor is occluded](https://forums.unrealengine.com/t/why-does-the-function-aactor-wasrecentlyrendered-return-true-for-occluded-actors/1256309))

- Getting Actors within the Camera’s frustrum (inefficient and doesn’t work super well because I’m using nDisplay and some of my actors are far out)

In editor, there is the option to ‘Freeze Rendering’ so that you can see what actors are being occluded. Is there an array somewhere in the engine that keeps track of these actors?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/5/fc50f6c341d26491c3d519ee804dd7e24472d08c.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/1/1d1a6db2d875da88958e5f739464f8f61634271d.jpeg)

TLDR; I would _love_ to have a TArray of all actors that are currently visible on screen.

Thanks!
