How to Change Cameras by UMG button?

  1. Add cameras in your Level

2)Open your Level BP and get reference to these cameras.

  1. Go to your GameMode BP and add variables of type Camera Actor (As many variables as their are cameras in your level)

57750-gamemodevar.png

  1. Go to your Level BP and Set these Game Mode variables value with the cameras that you have created in your level. Like Below :

  1. Now go to your widget BP, on Clicked event of button, get reference to Camera in your game mode and set it as active camera like below

Now you can set buttons for different camera views likewise.

1 Like