How to Transition the Camera when Interacting in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys welcome to new Unreal Engine 5 tutorial and today I'm going to show you on how to uh basically transition the camera from first person into a type of third person when you are interacting for example with a button or anything that you want it's going to be a very easy to follow so let's get started all right so I'll have you set up here just a like a button here like literally you cannot press or anything but I'm just to show you the functionality okay um so basically let's go ahead and the first thing I have to do is go ahead and open our third person character or your first person character if you already have like a mesh applied to it then you can you know have a character from the outside or uh whatever you know blueprint you have okay so I have basically my third person character I just put in the camera on his head so it's basically like in first person uh I do have a tutorial on first person to third person so I'll be linking it in the description so if you want to know how to do this uh yeah just check it out okay so so the first thing that we are going to need is a reference and to that position where the camera will change to the third person okay so uh basically you select the capsicle component and just add a an arrow okay it's an arrow and it's going to be the third person reference and basically we're gonna just go ahead and uh gonna get the pivot and just put it and place it where we want it to have okay so for example let's say that we want to have it over here it's gonna be looking kind of a phenango into uh where we are looking at like for example into the button or something like that okay so something like this we're going to turn it in later as we go okay so now that we have our third person reference we go into the events graph okay I'm gonna find a cool spot over here and uh basically you basically um call this event whenever you were to interact uh with a button or whatever you want to use for okay my case I'm just gonna do it when I press a key um but I'm going to do a proper balance so it's good because some event it's gonna be um transition camera two third person okay so the first thing that we want to do is uh go ahead and create a new timeline uh because the timeline will allow us to create a smooth turn station so let's go ahead and add a timeline over here uh you know call it what you want in my case I'm just going to call it transition and just plug it into play from start so every time we call this it will play it from the start okay so now we can double click to go ahead and open it and I'm gonna add a new track which is going to be a floats track um name it how you want okay okay it's going to be output I don't really care how it's called for this tutorial uh so that a length is going to be for example two seconds or whatever um and then basically add a key this is going to be a starting point so the starting point is going to be on time 0 and value zero and I get another key I'm gonna make it so that the time is the length of the um of the track and the value is going to be always one okay so now we can go back into the wind graph and we have the output over here okay so now we want to get our full camera which is basically our first person camera I'm gonna drag it and I'm gonna set the world transform okay over here so this will basically just uh change uh the position and rotation and scale even though we're not going to use a scale of the camera at once but of course if we plug it in with our uh um timeline we can get a smooth transition out of it so just plug it into the update and what we have to do now is in the output we have to lure bit basically LARP is just like interplay into different values okay slowly um so we're going to do a type of transform and so the first transform is going to be our actual position right now of the camera so it's going to be uh follow camera you drag it here and then get world and basically we'll get the transform of the canvas because we're going from A to B slowly with the alpha of the uh translation over here and then the the point that we want to go is the third person reference let's go here and then say Get Well transform and then basically go ahead and plug it into B and then the return value is going to go into the set World transform and that's pretty much it the the setup uh now uh I'm just gonna call it for example when I press k or something like that let's see uh for example uh n okay so when I press N I will just call this just for tests okay this would you will call this event whenever you actually want to apply it into your um gameplay so I'm just gonna go on transition coming to the third person and now if I compile and save we can go ahead and test it out so I'm gonna go here we have first person and if I were to press n you can see how the camera will change into the version now uh we have to play around with the value of um our reference so it was a bit too low and like this so we're gonna change it like this so just go ahead and play around and another thing that we can do and this will depend how you want to do it but I will go ahead and disable the input um of good player and then we'll go ahead and enable it again and of course transition back into um first person but to to see how it does go here press n and we can see how it's looking a bit better uh now you can see that the camera actually um because I had set it up into use Pawn rotation um basically it doesn't allow to you know rotate it um basically it stays the same as it was in first person so um also after we sell the input actually even four what we can do is just get the full camera and set upon on control rotation and it's gonna be basically disabled so now I should be able to uh press n and transition and now you can see that the camera the camera protection it doesn't uh from the previous first person one so yeah just we have to tune in this bit better um now you can use a actual camera to play around with your value uh and get exactly what we want but I think this honestly looks pretty cool so now we have to do that it will transition back and I will do it with a delay you get great enough uh like events so we'll call it back uh what you want but in my case it's going to be automatically so it's gonna be after like for example just uh three seconds waiting in third person and basically we're going to do pretty much the same stuff so we're gonna go ahead and just copy this until here and just paste it um here we go this will also create a new timeline um it will have the same parameters you can use you know rename it transition back or whatever you want to call it uh and then it will enable uh just upon control rotation um but I would do that at the end so I'm gonna unplug it here we go and basically plug it in into finished so we'd only do it when it's finished and plug it through and then instead of disable the input it will enable uh the input but again uh I can do it oh sorry in the finish so enable input and then also we're going to do is just uh yeah plug it in from play to start so now basically we need a reference for the first person camera um so we're going to do is just in the full camera I'm gonna add another arrow and it's gonna be uh FPS reference uh it's gonna be with the rotations this is the zoom and then we can leave it on the mesh and there we go we have the rotation uh so now we can do is just go back into advanced graph and on here the FPS ref sorry is going to be on here instead of uh the third person reference ah this place sorry yeah so now we can go ahead press play you can go here and press and it will switch third person and then back into first person and then when it begins finish we can go ahead and go back into our control and you can go ahead and also play around with the view of biangle um just to you know make it look exactly how you want um this is just basically go ahead and tweaking everything as you would like to do it so yeah uh pretty much like that so now go here Zan you can see how the camera changes and then it switched back into the person and of course if you want to do an animation like in a position button it'll be even better but yeah that's it guys I've enjoyed it so and found it helpful I really appreciate you like the video and subscribe to my channel have lots of Unreal Engine 5 tutorials as this one so if you want to check them out go ahead and oh yes with all that said bye bye foreign [Music]
Info
Channel: Gorka Games
Views: 9,057
Rating: undefined out of 5
Keywords: games, videojuegos, unreal engine, unreal engine 5, ue5, transition camera, tutorial, quixel, unreal engine tutorial, smooth camera transition unreal engine, ue5 transition from fps to third, ue5 interact transition tutorial, ue5 camera transition tutorial, unreal engine camera smooth transition, unreal engine 5 interact with button, unreal engine 5 camera smooth transition tutorial, ue5 tutorial camera transition between perspectives, how to transition camera in ue5
Id: 6r5FetTCHUk
Channel Id: undefined
Length: 9min 50sec (590 seconds)
Published: Sat Oct 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.