Switch between camera actor views in a simple UI menu

Hello,

I am trying to create a simple main menu from where to switch between camera views using buttons. I made the buttons menu using widget blueprint but I can’t reference the camera actors from level to widget blueprint. I copied them from level to widget but i get an error when I comply and save. I would appreciate if anyone could help me with this issue as I am a beginner in Unreal. Thanks

Hey @razvan.badea

you can do it like this:

Create a widget like this:


With these events:

With this you can switch the camera when you click a button. When you click a button you set the CameraNumber and then execute ChangeCamera. Here you select a camera from the array with the CameraNumber and set this as your new point of view.

To use this you have to go in the level blueprint and create this:

  1. Remove the grey ball. This is the standard pawn visualized inside the level. It will be visible because you switch to a camera and the pawn will stay in position. So we just hide it.
  2. Create the widget and set a reference to this widget
  3. Drag and drop the cameras from the level outliner into the blueprint. Make an array out of them and use a random camera as your point of view.
  4. Send the camera array to the widget to be able to work with it
  5. Add the widget to the viewport
  6. Show the mouse

CameraSwitch.zip 5.1.1 (46.2 KB)

2 Likes

Hello and thank you for your response. It looks a bit difficult for my beginner’s experience but I will have a go.