# Can I make the camera draw to a specified region of the game window?

**URL:** <https://forums.unrealengine.com/t/can-i-make-the-camera-draw-to-a-specified-region-of-the-game-window/324255>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, UE4, question, CPP\
**Created:** [July 6, 2015, 2:46pm UTC](https://forums.unrealengine.com/t/can-i-make-the-camera-draw-to-a-specified-region-of-the-game-window/324255 "2015-07-06T14:46:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2e0fa2b2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2e0fa2b2](https://forums.unrealengine.com/u/anonymous_user_2e0fa2b2)\
**Post date:** [July 6, 2015, 2:46pm UTC](https://forums.unrealengine.com/t/can-i-make-the-camera-draw-to-a-specified-region-of-the-game-window/324255/1 "2015-07-06T14:46:46Z")

</div>

Some background information: I’ve built a gameplay prototype in Unity 3D, and I’m moving to UE4 for production (mainly because I would like more robust networking and demo recording).

One aspect of my prototype that I’m having trouble duplicating in UE4 is the screen configuration. The game is played in portrait orientation, with the in-game camera rendering to the top half of the screen, and the HUD filling the bottom half to leave the player’s view unobstructed.

 ![49268-unityviewport.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/a/cfa1349fe2c8c37fa9b48698901711805c567704.jpeg)

In Unity, this is very easy - all cameras simply have a ViewportRect attribute which determines what part of the (normalized) screen space they render to. But UE4 doesn’t seem to expose this functionality directly. I can see where [GameViewportClient][2] uses information from [FPerPlayerSplitscreenData][3] to set up different cameras to different parts of the screen, but:

A.) I’m unsure how to control this in my own C++ classes without hacking it into the engine itself, and

B.) I don’t know if I would still be able to render HUD elements in the remaining screen space.

Obviously, I could use the brute force solution of rendering the camera view to a texture and then drawing that texture in the UI, but since this is a mobile game I would like to avoid the memory and draw call overhead if at all possible.

I would greatly appreciate any insights anyone can offer! Thanks. 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1fdc2b67](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1fdc2b67](https://forums.unrealengine.com/u/anonymous_user_1fdc2b67)\
**Post date:** [November 15, 2015, 1:53pm UTC](https://forums.unrealengine.com/t/can-i-make-the-camera-draw-to-a-specified-region-of-the-game-window/324255/2 "2015-11-15T13:53:45Z")

</div>

Hello I hope I understood what you want cuz im in hurry right now.

I printed a crosshair at a specific point on the map with blueprints using ConvertWorldLocationToScreenLocation from the Player Controller and then drawed a texture at the x and y cords of the return. In blueprints it also returns whether the location is on the screen.

**You can look for ConvertWorldLocationToScreenLocation in the PlayerController from the HUD class and Draw a rectangle.**

If you want the edges to be smooth you would have to combine draw line functions and draw circle funktions.

Good luck!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b590faa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b590faa](https://forums.unrealengine.com/u/anonymous_user_5b590faa)\
**Post date:** [October 6, 2016, 2:39pm UTC](https://forums.unrealengine.com/t/can-i-make-the-camera-draw-to-a-specified-region-of-the-game-window/324255/3 "2016-10-06T14:39:45Z")

</div>

I asked separately and as a result there is a pending feature request. Vote for it and hopefully it becomes a reality.

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-36928)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

---

<div class="post-metadata">

**Author:** ![Sean\_Maxhell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Maxhell](https://forums.unrealengine.com/u/Sean_Maxhell)\
**Post date:** [June 7, 2024, 10:32am UTC](https://forums.unrealengine.com/t/can-i-make-the-camera-draw-to-a-specified-region-of-the-game-window/324255/4 "2024-06-07T10:32:28Z")

</div>

Any Solutions?
