# Resize game viewport

**URL:** <https://forums.unrealengine.com/t/resize-game-viewport/54381>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [February 3, 2016, 4:52pm UTC](https://forums.unrealengine.com/t/resize-game-viewport/54381 "2016-02-03T16:52:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![speedpacer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@speedpacer](https://forums.unrealengine.com/u/speedpacer)\
**Post date:** [February 3, 2016, 4:52pm UTC](https://forums.unrealengine.com/t/resize-game-viewport/54381/1 "2016-02-03T16:52:40Z")

</div>

I need to resize the main viewport in the game and put HUD stuff around it rather than over it. Google didn’t turn up much but I’m thinking it would be done with FViewportFrame::ResizeFrame? Does anyone have an example of how and where to implement this?

---

<div class="post-metadata">

**Author:** ![speedpacer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@speedpacer](https://forums.unrealengine.com/u/speedpacer)\
**Post date:** [February 3, 2016, 5:17pm UTC](https://forums.unrealengine.com/t/resize-game-viewport/54381/2 "2016-02-03T17:17:27Z")

</div>

Basically like this:

 ![9c79a830473933.56250e8a471fc.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/4/04a68418e2e0e7786763a16d0f496340e28177a8.jpeg)

So if this image was split up between three monitors, the middle monitor (main screen) would show the launchpad and the HUD below it, and the left and right monitors would be for configurations and displaying data. Or if the user only had one monitor, they could just switch between the 3 screens. The middle part is what I’m trying to figure out right now though, how to resize the display so that I can put the HUD underneath it. There also needs to be a way for the user to toggle between the resized viewport or to maximize it.

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [February 4, 2016, 3:45pm UTC](https://forums.unrealengine.com/t/resize-game-viewport/54381/3 "2016-02-04T15:45:09Z")

</div>

One way to do it is using RenderToTarget texture and add a Image in your UI to display it. From a performance perspective, it’s not the best 😛 but it will work

In fact the GameViewport include the UI, so if you are modifing it, you are impacting your UI size also.

You might have a look at “multiple” Viewport (like multiplayer game on 1 device) and see if you can use this have 1 viewport drawing the UI and the other one the main image.

---

<div class="post-metadata">

**Author:** ![TinkrDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TinkrDev](https://forums.unrealengine.com/u/TinkrDev)\
**Post date:** [November 13, 2019, 7:59am UTC](https://forums.unrealengine.com/t/resize-game-viewport/54381/4 "2019-11-13T07:59:59Z")

</div>

Is there anyway to easily change the projection matrix/view port for 3D scene, and render 2D HUD on the side like the pic shown above?

---

<div class="post-metadata">

**Author:** ![Antidamage](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/antidamage/32/918692_2.png) [@Antidamage](https://forums.unrealengine.com/u/Antidamage)\
**Post date:** [November 13, 2019, 9:28am UTC](https://forums.unrealengine.com/t/resize-game-viewport/54381/5 "2019-11-13T09:28:24Z")

</div>

It was basically explained above: use a render target. If you’re not re-rendering the scene behind the UI again then it should be faster than a full-screen pass would have been.

Of course you’d have to be clipping off a LOT of the viewport to justify it. If it doesn’t look like the sample above I wouldn’t bother with it at all and I’d just draw the HUD over the viewport.

---

<div class="post-metadata">

**Author:** ![SasMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SasMaster](https://forums.unrealengine.com/u/SasMaster)\
**Post date:** [September 15, 2021, 8:30pm UTC](https://forums.unrealengine.com/t/resize-game-viewport/54381/6 "2021-09-15T20:30:44Z")

</div>

Cool UI btw.

---

<div class="post-metadata">

**Author:** ![Aubrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aubrey](https://forums.unrealengine.com/u/Aubrey)\
**Post date:** [November 18, 2024, 5:24pm UTC](https://forums.unrealengine.com/t/resize-game-viewport/54381/7 "2024-11-18T17:24:20Z")

</div>

In case you don’t want to use render targets, there is a plugin for that now.  
Answered here:

> [@Split viewport into areas of different contents](https://forums.unrealengine.com/t/split-viewport-into-areas-of-different-contents/335038):
>
> I want to split my viewport into three different areas of content like the picture below. There are two UMG Widgets and the main viewport. I know how to make a UMG Widget to show in the viewport, but I want to separate the viewport from the UMG. One thought is to make 3 Canvas Panels in one UMG Widget and then assign the content to each panel. Is it possible to set the viewport to a Canvas Panel like so? Or is there any other way to achieve the same result?

The plugin docs:

> **[UE5 Separate Viewport From Widgets: EnhancedUI – Enhanced UI Plugin](https://store.algosyntax.com/tutorials/unreal-engine/ue5-separate-viewport-from-widgets-enhancedui)**
>
> Unreal Engine 5 is a powerful platform that extends beyond game development, enabling the creation of sophisticated applications with intricate user
