# Screenshot from camera POV using Python

**URL:** <https://forums.unrealengine.com/t/screenshot-from-camera-pov-using-python/1181198>\
**Category:** Editor Scripting\
**Tags:** unreal-engine, question\
**Created:** [May 28, 2023, 12:01pm UTC](https://forums.unrealengine.com/t/screenshot-from-camera-pov-using-python/1181198 "2023-05-28T12:01:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Golden\_Geck0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Golden\_Geck0](https://forums.unrealengine.com/u/Golden_Geck0)\
**Post date:** [May 28, 2023, 12:01pm UTC](https://forums.unrealengine.com/t/screenshot-from-camera-pov-using-python/1181198/1 "2023-05-28T12:01:35Z")

</div>

I’m trying to take a picture from the point of view of a camera in the game without adjusting the viewport (just like what you see when you select the camera during editing).

I have tried using `take_automation_screenshot_at_camera` but can’t work out what it wants for the `latent_info` arg, so haven’t got that working.

I tried `take_high_res_screenshot` passing in my camera as an option, but it adjusted the viewport and the picture was not of what the camera was looking at.

Even better would be if I could do it in memory so that I don’t need to write the output to file.

Any assistance would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Adenex\_x](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Adenex\_x](https://forums.unrealengine.com/u/Adenex_x)\
**Post date:** [May 29, 2023, 2:25pm UTC](https://forums.unrealengine.com/t/screenshot-from-camera-pov-using-python/1181198/2 "2023-05-29T14:25:02Z")

</div>

maybe you can try to pilot that camera, take SS and eject the camera

---

<div class="post-metadata">

**Author:** ![quackaddict7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@quackaddict7](https://forums.unrealengine.com/u/quackaddict7)\
**Post date:** [December 4, 2023, 6:29pm UTC](https://forums.unrealengine.com/t/screenshot-from-camera-pov-using-python/1181198/3 "2023-12-04T18:29:21Z")

</div>

It seems like take\_high\_res\_screenshot() defaults to the player controller view, since it’s used for automation testing. In my usage, I found that it completely ignored passing in a camera actor to it (like you found also).

However, I did find that I could use something like this first to cast the view of that camera target onto the player controller, then that screenshot function worked as expected.

e.g.  
player\_controller.set\_view\_target\_with\_blend(camera\_actor) # NOTE: Only need to set the player view to the camera actor’s view once, this setting sticks
