Anyway to replicate this UI?

I basically want to move my player controlled pawn to the right of the viewport, or specify my viewport to the right instead of my whole screen. Currently my pawn spawns perfectly in the center of the screen, but I want the left and bottom to be cut-off. I want the player to feel like they’re in the center of the visible viewport instead. I can’t move the camera spring arm because the orbit will feel out of place. Any simple way to achieve this look, similar to the old Virtual Villager games?

My line trace dead center:


Goal:

Hey @k_dizzle_d how are you?

I’ve been tinkering with a copule of things to achieve this effect and I found something a little bit tricky but really useful!

You can use Render Target, Scene Capture 2D Component and a Widget to render the playable area inside a widget!

Let me explain how to do it step by step:

  1. Create Render Target: Right click on your content browser and search for “Render Target”. Create one named “RT_GameView” with the following settings:

  2. Remove camera from character: go to your player character and remove the camera from its component. Then add a spring component (or use the one the camera was attached to) and set its rotation type to “World”:

  3. Add Scene Capture 2D Component to character as a child of Spring Arm:

  4. Add the RT to that Scene Capture 2D Component, and make sure the settings are the same as in the following image:

  5. Config the Spring Arm rotation to the angle you want. I’ve used this for isometric view:

  6. Create a new Material and add RT as texture, make sure you have the same settings:

  7. Create a Widget with a canvas and an Image in the position you want your playable area (the grey area represents your HUD):

  8. Add the created material as the Brush for that image:

  9. Go back to the player and add the widget to player’s viewport:

  10. Last but not least, in your player controller move the main camera to a fixed point outside the map, so it doesn’t render anything else:

10.B) The “BP_Aux_Actor” is just a box outside the map, as you can see here:

And that’s it! With that you will see your character perfectly centered on your playable area!

This is how it looks:

Hope this helps you!! Let me know if you need anything else related to this :smiley: