# how to check if an actor is on screen?

**URL:** <https://forums.unrealengine.com/t/how-to-check-if-an-actor-is-on-screen/782062>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [March 2, 2023, 1:02pm UTC](https://forums.unrealengine.com/t/how-to-check-if-an-actor-is-on-screen/782062 "2023-03-02T13:02:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lostshun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lostshun](https://forums.unrealengine.com/u/lostshun)\
**Post date:** [March 2, 2023, 1:02pm UTC](https://forums.unrealengine.com/t/how-to-check-if-an-actor-is-on-screen/782062/1 "2023-03-02T13:02:20Z")

</div>

I have to check an actor if it is visible on screen on not.  
The tricky part is that what is on screen is not from the player pov, but a surveillance camera.  
Basically, if a specific actor comes within the surveillance camera field that is projected into viewport, I want to activate an alarm.

How do I do that in BP. Thank you!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 2, 2023, 1:55pm UTC](https://forums.unrealengine.com/t/how-to-check-if-an-actor-is-on-screen/782062/2 "2023-03-02T13:55:48Z")

</div>

> [@lostshun](#):
>
> I have to check an actor if it is visible on screen on not.

So we’re not really checking that. We’re checking whether the surveillance cam can detect a pawn. Have you looked into Pawn Sensing?

Something similar to:

> [@Restrict Pawn's Rotation](https://forums.unrealengine.com/t/restrict-pawns-rotation/487856/7):
>
> Just to clarify: [[Image from Gyazo]](https://gyazo.com/d85aeee26dd5c1117565318e731a86fa) This is based on Distance from the Player but, ideally, should also incorporate the angle so the whole thing switches off (disable Tick, mayhap?) when the player is far away and outside of the vision cone. The vision cone is already calculated so you could leverage that. But ofc, you may have a different idea as to when the turret’s target seeking script kicks in!

* * *

This component:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/9/d3953be3e518145b2403f88a4077d2231f650e2e.png)

Could that work in your scenario?

---

<div class="post-metadata">

**Author:** ![lostshun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lostshun](https://forums.unrealengine.com/u/lostshun)\
**Post date:** [March 2, 2023, 2:02pm UTC](https://forums.unrealengine.com/t/how-to-check-if-an-actor-is-on-screen/782062/3 "2023-03-02T14:02:13Z")

</div>

Weeeeeeell, actually, the gameplay itself is on what is on the surveillance camera! (so there is not player actor involved)  
But ok, I am going to check that

---

<div class="post-metadata">

**Author:** ![lostshun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lostshun](https://forums.unrealengine.com/u/lostshun)\
**Post date:** [March 2, 2023, 2:31pm UTC](https://forums.unrealengine.com/t/how-to-check-if-an-actor-is-on-screen/782062/4 "2023-03-02T14:31:50Z")

</div>

I am following [this thread](https://forums.unrealengine.com/t/how-to-know-if-an-actor-is-on-screen/18961/8)

 ![screencapture](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/e/2/8e2132715dc95b8230fdcc845ceb3989e3e877fe.png)

Can I change the GetPlayerController here with the active camera?
