How To Set Up The Ultimate True First Person Camera in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys mizofrizo here and in this tutorial I'm going to be showing you how to make a true first person camera in Unreal Engine 5. so if I look down here and I press f8 to eject you'll see that my character is bending over forward to look down and if I look up and eject see she's looking up uh another thing which I think you'll think is uh quite cool is if you look at the shadow here you can actually see that the head is also turning so if I turn all the way to the right here and inject she's looking to the right and if I look to the left and eject you see she's looking to the left so without further Ado guys let me show you how to do this alrighty for the record I'm using Unreal Engine 5.2.0 we're going to create a new project using the third person template leave everything as default and hit create once the editor has fired up for the third person folder Blueprints and BP third person character select the camera boom and hit delete grab the follow camera and drag it onto mesh and over here in the details panel we can change the parent socket to head zero out the transform and make sure rotation snapping is switched on because we're going to rotate the camera 90 degrees this way and 90 degrees that way to get it aligned properly you'll know it's aligned properly because this Gizmo will be aligned with this X Y and Z down here and in the location we're going to change this first value to 8 and the second value to 12 and as you can see by where the Gizmo is on her head this is a pretty good position for a true first person camera we're also going to select the root here and search for controller use controller rotation your to check this one and head over to the event graph this camera inputs where we're going to be working but we might need a little bit more space so let's just move this down here make this a bit bigger drag these out and down here we're going to create a couple of new variables we're going to create your of type float we can duplicate that one and call this one pitch we're going to set these here and so let's do pitch first this one will be the looking up and down so this one is going to set um this variable based on action value Y which is the up and down movement of the mouse so you can drag off this reroute node here and find add we are going to add to the pitch so this is going to be cumulative every time you move the mouse up and down it's going to add add to the pitch and obviously we don't want it to add infiniteum so we are going to clamp this and we are going to clamp it between the values of negative 18 and 18. the reason this is 18 is this is 90 as in degrees divided by 5. this will be effectively multiplied by 5 in the animation blueprint which you'll see you'll see why in a moment it's also set up the your while we're here so yours going to go off action value X which is the left and right input of our Mouse so we can drag off of here and add going to add this to the your and clamp it I quite made myself enough space here and this one we're going to clamp between the values of negative 10 and 20. the reason these uh are not the same is is because Quinn's body is kind of bladed off a little bit you can actually you can set this even higher you'll see you'll I'll show you what I mean in a minute so this is all set up here if we look for the NM class you'll see the animation blueprint here you can hit browse ABP Quinn is actually a child of ABP many so we'll make changes to ABP many first thing we're going to do is delete this cast to character and instead we're going to cast to BP third person character plug it into this set variable here and also select the set variable and change the variable type to BP third person character change variable type drag off of character here and let's get pitch also we are going to get your promote each of these to a variable create a new execution pin here and plug these in there we go we've got access to our pitch in your in our animation blueprint now head over to the anim graph and what we're going to do is Select everything here move it way out to the left because we're going to need a bunch of space here for some new nodes and what we're going to look for now is transform modify bone transform modify bone this one now we only need rotation here so over here in the details panel find translation and uncheck this x expose as pin we are going to need rotation so leave that one but change the rotation mode to add to existing and scale we can unexpose that as a pin Alpha unexpose that as a pin so we just should just have this one pin rotation with the rotation mode set to add to existing we are going to duplicate this four times plug this in here and you'll get this interim node local to component plug all these in in sequence and again you'll get component to local here look for a make rotator plug this into each of these nodes these little pop-ups are really annoying I think it's a it's a bug we're going to get our pitch here plug it into X I know it says roll here but this is the one we need but we are looking up and down and that is pitch select the first transform modify bone here and change bone to modify to spine one and the next one to spine two so on and so forth spine three spine four and spine five that's our looking up and down set up we actually are going to need a little bit more space than this and what we're going to do now is select the first three transform modified bones and the make rotator and we're going to duplicate that over here plug these in we're going to get our your and plug it into your and change these bones to the neck one neck two and head and that's our head turning and that should be so pitch yep spine one two three four five and the you're plugged into neck one neck two and head that should be it guys I'm just going to quickly change my Max FPS 260. and hit play and there we have it our true first person camera so if I look down and say to the side and eject she's looking down into the side pretty cool and if I look up into the right and eject she's got some funky stuff going on there but that's okay pretty cool huh all right guys if this has been of any value to you please hit like And subscribe and I will see you on the next one
Info
Channel: MizzoFrizzo
Views: 10,323
Rating: undefined out of 5
Keywords: UE5, learning, video games, video game development, true FPS, how to create a true first person camera in unreal engine 5, tutorial, true first person camera, TFPS, ue, unreal engine tutorial, unreal engine 5 tutorial, ue5 true first person camera
Id: Y9Eo9iSdwz4
Channel Id: undefined
Length: 9min 55sec (595 seconds)
Published: Wed Jul 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.