I have got a Wiget popping up with a button on it when i press that button i want to be able to view through a different camera. Anyone have any ideas?
i assume you are asking for this
you can use this in your player character,
1.you can add a custom event in you player blueprint and on click to widget button you can cast to player and call that custom event
2,in this custom event you can use these activate nodes(shown in image) to activate new camera and deactivate the old one
what if i wanted to use a camera on my map not player
you can use spectator pawn for that
create a new blueprint of class spectator pawn and posses it on widget button click
Hey all!
You might not want to possess a pawn just to get a camera. You can simply set a camera instance in your level as a variable and set that to be changed to upon the click That way you retain control of your character if needed. IE old school Resident Evil camera.
yes that is the best way to do it .
how do i set that to change sorry im a newbie
Okay @The_DecafEagle75
First make sure you have a camera actor added to your scene. (you can skip this step if you do)
Next we’re going into our game mode, adding a “Camera Actor” Object Variable and putting this code in. It’ll set our camera for the player controller to whatever Camera2’s variable is set as (we’ll get to that in a minute).
Next we’re going to the button “On Clicked” event. We’ll get the game mode, cast it to have it act as the game mode we’re using that we just put that other code on, and dragging off the “As:” pin we’ll call that camera switch function. Now we just need the game mode to know what camera has to be used!
Now we’ll open the Level Blueprint to set the game mode’s camera variable because you can’t call on the LBP like that, the LBP pushes outwards only (most of the time). So first we’ll get our camera actor on the LBP by dragging it in from the world outliner.
Then we’re going to get our game mode, cast it to the GameMode we’re using since that one will have our camera variable, and drag off of that to set your game mode’s camera variable. That should be it!
Thanks Dude!
LEGEND!!! If ur interested in what im making here ya go SpongeBob Game Lv1 - YouTube
Whoa, trippy! Keep it up and put in the work, and you’ll be amazed at what you can achieve in the UE5 space!
hey im back again how would i do it if i just wanted to go back to the third person character camera after swiching?
Welcome back!
We can definitely do that! So how would you like to activate returning to your third person camera?
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.