A tutorial for UMG buttons to change camera view in FP game

I wondered if anybody could point me to a tutorial that might help me have buttons that change the camera view in a simple UE4.16 game?

I have 5 buildings that I want the player to be able to wander around using a FP-style gameplay (mouse and keyboard). As the site is quite large, I’d like to have 5 buttons on screen at all times that, when clicked, will whisk the viewer to one of 5 selected cameras: one camera for each of the five buildings.

a) when using the mouse and WASD keyboard buttons to navigate, how would you achieve a mouse cursor to click on the buttons? Is this even possible/workable? If not, what would be a better approach? Numbers on the keyboard (1-5) that move between cameras?

b) a step -by-step guide to assigning behaviours to buttons would be fantastic: a day of searching has given me plenty of useful stuff, but I haven’t been able to connect the dots into a workable solution.

Any help would be massively appreciated.

Hi there,

well, a full tutorial don’t exist for that. I try to answer your question (without BP’s because i am not on my pc).

a)
In your Player-Blueprint create a custom Event, Name it like “ShowMouse”. In this Event you Need the node “get Player Controller”. From this node search for “set Show mouse Cursor” and set it to true. Then from the Controller node create another node called “set Input mode” in wich you choose UI only. With that you are be able to click on your Widget-Buttons.
Of course you Need a back button that fires then a Event where you set Show mouse Cursor to false and set Input mode to game.

b)
For the cameras there is a way to blend between them. Create in your widget a custom Event for every camera. In that Event you have to call “set view target with blend”.

I hope this info help you out.