Create a SideScroller from the Third Person Template in Unreal 5 with Enhanced Input

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody this tutorial is going to talk about how to create our third person template and convert that into a side scroller because I didn't see that inside of the new template settings inside of unreal 5. so I just wanted to make my own and show you how to how you can convert it into that now this is actually a revised version of a video that I made earlier this year and I had to remake it and kind of like reorganize it because they came out with the new input system and it it kind of messed up some stuff so this version includes some new input and it should be a cleaner overall walkthrough and you know hopefully you enjoy it I like side scrollers and I want to be able to create those inside of unreal and this will get you a template that will allow you to you know start creating some stuff hope you enjoy and hope you make some really cool things from it so we're inside of unreal we've chosen the third person template so we should be able to drop a third person character in the map but what we want to do is we want to create a side scrolling game type by using that third person controller and just putting it on two axes so instead of being able to walk all around and jump and whatnot we want to look at it from a side view and we only want it to go up and to the side primarily what we want to do right now is just do our major game setup and talk about our game mode and and how we're spawning and all that before we even get into the character controller so that's what I'm going to do inside of this video is we're going to set up our overall game and our project so first off we have a lot of extra stuff here I'm going to go ahead and delete a lot of the extras so you know over here on our playground we can select that we'll right click our folder delete we also don't need a lot of this stuff over here like all these ramps and circles and things we can always recreate that later if we want so I'm just going to go around and delete all this stuff in my map these series of blocks I'll keep my lighting but I'm going to highlight these folders hold shift and right click edit delete okay we are going to keep our players start mainly I'm just getting rid of a lot of My Level geometry and if you'd rather select it and delete it that's fine I'm going to keep my floor and I'm going to keep my back wall I think so first off look over here at the forward Direction over here see if we do our red handle like that our X is moving we want our red arrow to be pointing in the forward Direction all right so we want our Z to be up and our X to be our side so we want our character to move along this this axis right here so what I'm going to do is I'm going to delete these side walls like that uh we'll probably delete the text as well I'm going to keep this back wall and I'm going to take my player start and I'm going to zero out the Y right here in this game type I want to keep my Y at zero so that it's really easy to put everything on the axis that we want to move along in a side scroller game we want it to be you know in this one plane right here this plane of gameplay so I'm going to keep my y 0 just so I can very easily align everything so now I'm going to take my wall I'm going to move it back that you can see that I'm getting this bad indicator meaning that there's nothing on the floor or that it's intersecting with the floor so let's move our floor back some let's actually move it back even further just like that so that's hidden we could always reshape that later if we want but I'm going to come over here and I'm going to pull that up slightly all right okay so we have our wall and we have our floor and what's really important is our player's start is y zero and the x and z is you know wherever we want to spawn it you know actually we can move our our plane over here if we want and let's make sure that we zero out the Y on that anything that we want to align with the gameplay we want to zero out in y but you can also see that you know the pivot over here is kind of weird so I can actually move that over there and that's not really a problem and we'll delete out some of these so delete delete delete all this out so if you want to drag select inside the viewport you can hold Ctrl and ALT at the same time you can select make sure that you don't select the sky sphere though so we can hold Ctrl and deselect there or you could click and you know hold Ctrl and click one at a time if you want either way but we're going to select these objects and hit delete but again make sure you don't accidentally select something in the background like the sky sphere and delete that otherwise just undo post process volume we will keep that as well this is all our lighting stuff up here oh all right so we have our basic scene setup let's see there's nothing over there we have a floor a wall a ramp we can group This Together inside of a folder if you click hold shift and then once we have those selected we can hit the create a new folder we'll call this level Geo or something okay so we can keep that grouped I think we're good now the important thing is our player start is 0y and then the x and z is just however you want to position it and we have some kind of level geometry we could you know scale this up if we like by holding r okay we have our level set up but now it's time to talk about the overall game structure and how we're going to organize things from the top down first of all with our third person blueprint if you open this up over here you're going to see a third person down here in blueprints the third person character now by the way I also did create my project with starter content if you did not you can always hit the add button and you can either add feature or content pack you can import assets or whatever like add feature content you can import the third person or whatever if you did not do this on your project or you can also click on starter content and import that so I'm just using the starter content so that I have some prototyping materials so little explosions and shapes and whatnot but you could also create your own if you want but that's where I'm coming from so I have the third person character in here you're also going to see some other things like BP underscore third person game mode I'm going to customize all this myself because I want to take this and make a side scrolling game but the other thing is I don't want to I don't want to do a lot of work on this specific controller and then accidentally import something else that just overrides all my work right I want to take this and make a separate copy of it so the first thing I'm going to do is I'm going to create my own folder so over here in content right click go to new folder and we'll call This Ss game something to let us know that this is our side scroller separate from the other ones and if your project gets a lot bigger than this you can start to reorganize like you know you can separate out your starter content into something else or your characters and you know whatever for now I just want something that lets me know this is where all my custom content is I'm gonna go down to Blueprints and the first thing I'm going to do is I'm going to right click click and duplicate the third person character so I can customize this to be my own so right click duplicate we'll call this BP underscore assess character for side scroller so this is a duplicate of this version but we're going to customize this one to actually make it a side-scroller character now anytime you see a star on your assets right here it means that we've done something that is not saved into the project so we can just click the save all and you can see it created a lot of things here and we deleted some things and whatnot in our map we'll click save selected make sure that we represent that and we will drag this over this new BP underscore SS character over into SS game and we actually want to move it here and I make a copy otherwise we'll start to get confused so move so we'll see that over here let's also save our map so we'll click file save current level as we'll choose SS game and let's name it SS underscore sandbox I think would be more appropriate now we have our character that is customized our sandbox and these are separate from the provided materials the other thing that we need is our game mode I'm going to in here right click choose blueprint class and now it's asking what I want to create I'm going to create a brand new game mode base okay now our game mode is going to allow us to customize a lot of very specific things which I'll show you in a second but click game mode and call this BP underscore SS game mode again I'm going to hit save all save selected sometimes if you don't save your assets and you have a crash I can make some really weird error connection things if I were to double click my game mode over here in my classes inside of this BP underscore SS game mode the game mode will help us determine what are all these specific systems that are related to this game mode that we assign and that sounds a little bit weird but let me X out of this real quick each of our levels can define a game mode in it so you could imagine that this is our side scroller game the game mode on our side scroller might be different than the game mode and our main menu or the game mode and our Capture the Flag or the game mode and our rail shooter or whatever our game mode is going to determine the type of player Pawn that spawns the type of controller we have the type of Hud we see all that and so for our side scrolling level we want to Define what that game mode does so if you again double click this to bring it back up if you don't see this you might see the open pool blueprint editor you can click that this is just a very simplified view our game session right we could customize the type of game session this is the the persistent game that travels with us and we can save information to our game State this is like the intro cut scene the round being played the exit game set whatever the overall game State our player controller this is our representation of the player in the scene so for example our player can exist exist separately from our player character right our player can press the backspace button to reload the level even after our player character is defeated and doesn't exist in the scene right our player is very different from the character our player controls that can be kind of a weird concept to think about if it's your first time thinking about that our player's state is any of the information related to the player not just the player Pawn or sometimes I just call it the player character the unit that the player is controlling for example our player could have a certain number of lives so our player has three lives but our player Pawn right our default Pawn class our player Pawn may have health that is independent of the number of lives it doesn't know how many lives it has the player owns the lives and the score but the player Pawn or the player character has the health and ammo and whatever all this stuff we can largely keep the same but we will customize this as we keep going and our game mode is what defines all the controllers and larger types of things that we use for our gameplay so anyways let's talk about what we do want to customize for this game type I'm going to create a side scrolling player controller and we'll customize that I'm going to create a side scroller let's see default Pond class and we'll customize that and then we will also have our side scroller game mode I think that'll be good for now we may end up creating more as we go on but for now I think that's fine so a side scroller player controller and a side scroller default Pawn so it's going to be the character that we create in our scene so let's go ahead and create those right click blueprint class so first of all recruit we'll create a new player controller okay this is BP underscore SS layer control hit save all save and remember this is the player that is giving input into the game not not the player Pawn the thing that's moving around in our game the little character that's moving and jumping whatever that's our player Pawn our player is the larger concept of the the player interacting with the game right we can destroy the player Pawn but the player still exists that they're putting in things inside of a keyboard okay so that's our player controller we already created our player plan over here and more specifically this is a type of character which is a more specified version of a pawn so a character is just a pawn that has a lot of extra functionality for movement and whatnot all right so that means inside of our game mode over here when we Define the side scrolling game mode we want to keep all the stuff by default but we want the player controller to be with this drop down our BP access player controller and we want our default Pawn to be our BP underscore SS character okay not the third person this is the duplicate that we made because we're going to make changes to it again we're working like really high level architecture right now just the setup we'll compile we'll save so when we assign this game mode to a particular level then that level will use the side scroller player controller and the side scroller character when it spawns in when we press the play button so we'll close that and I think this is good for now again we can mess with UI and HUD and whatever and Define that for this game mode or whatever but I think this will give us the basic building blocks so the last thing to do is to assign this game mode that uses this side scroller player controller in this side scroller character inside of this level so the question is where do we do that so there's two different locations you can do you can either assign it in this level specifically or you can assign it in the project to use as the default now if you have a game where you have multiple side scrolling levels it might make sense to assign that as the default so let me show you where that would be if you click and edit and you go to Project settings and you're looking for something called maps and modes now there's two things I can assign in here the first thing is the default game mode if it doesn't know or it's not assigned what do we want to assign to it I'm going to click the drop down and choose BP underscore SS so if the majority of our maps are side scrolling games like our side scrolling setup then we want that to be our default not required we can set this map by map but by default we want the side scrolling setup so we'll set that game mode there the other thing is what do we want our map when we load the Unreal Engine to be well we don't want the third person map anymore we duplicated and made it a separate map right so let's choose our startup map to be SS underscore sandbox map all right in game default map in a lot of games you might have your main menu or your load screen or whatever for this I'm going to choose the SS sandbox map and you'd probably want to change this later if you had a more polished level that isn't a Sandbox but just you know just to show you these two things you probably want to set up as your new map that you're working out of so the three things that we set up here is our game mode our startup map and our default map close that out save okay so that's that's our default setup inside of our project settings one other thing that I want to test is in our world settings if we were to set map by map what the game mode was we can go into our world settings button over here if you don't see this you can actually go to window uh or World settings right here and you can pop up that panel but if you go to world settings and you scroll down a little bit you're going to see game mode game mode override allows you to choose a different game mode than the default which remember we just set our default as our side scrolling we can actually override that so that in the different maps that are not the default we could actually choose a different one we can see that our game mode override here is the third person we actually don't want that we created a brand new game mode that we want to use so click the drop down there and choose blueprint underscore SS game mode or you can choose none which we'll just use the default game mode right so we're going to choose none because we want this to default to the you know one that we set in Project settings but if you did not set something in Project settings it's really important that you actually just choose uh blueprint underscore ssk mode this is a little bit redundant if I were to leave it as a Sasuke mode but just to prevent errors and make this easier and more error proof I'm going to leave this here but if you did set it in the project default you shouldn't need to choose that you can just choose none right but I'm going to choose this just in case it causes issues for anybody we'll hit Ctrl s to save now if we hit the play button and you and you look inside your scene you can see that it is spawning our character at the player's start right and if we hit the um yeah I'm hitting the Windows button but you can also hit shift F1 for our mouse cursor scroll down the character that was spawned in our scene is the bpss character because we assign this to the ssk mode so if it is spawning the third person character then you did not do something correct if it is not using the SS game mode you did not do something correct make sure that when you hit the play button you're seeing these three things here are SS character SS game mode and our SS player controller so that then when we continue to customize these things right here inside of blueprints then we know that we're customizing the correct things otherwise you're editing assets that are not even in the scene right and obviously it's not going to appear to be working so once you get this far and you see the new custom assets that we made duplicated off of the old assets and we can continue to Define our game so make sure that you see this when you hit play and you should be ready to continue alright so the next thing that we have to do is we have to fix the camera so if I hit play you can see it isn't very much like a side scroller because our camera can just move all around what I really want to do is I want to lock the camera kind of like this so I move side to side it will actually you know work like a side scroller press Escape exit out so I don't have my content drawer docked if you do it this way you can always like bring it up real quick control space so if I go into my character controller if you don't see this window you may want to go to the event graph and these tags up here I'm not going to really talk about them yet but if you go to the event graph on our BP underscore SS character remember this is our new one not the old third person one right this is the new one that we created if you come into our SS character you're going to see all the input that gets connected to the functionality and so what's Happening Here is our camera is receiving controls but we really just don't want it to move at all we want it to be static so what I'm going to do is I'm just going to get rid of the camera input so I'm just going to select the camera input and select delete so we don't want to receive any camera input on our character in older versions of unreal this would look a little bit different because this is using the new input system so this stuff up here this just connects the newer enhanced input into the character controller you don't really need to mess with any of that we'll mess with the movement in a little bit and this is the jump but the main thing is we only want to delete out the part with the camera so if this looks any different in the future just delete the camera part so if we hit compile and we save and we hop back in now it should be a static camera but it's still not going to be quite what we want so let's test it out okay so you see we can move around and we can't really control the camera but it's not moving and that's kind of what we want we just want to rotate it and you know get it on a side scrolling kind of view I'm going to escape now if we come back into our character controller again again I press Ctrl space if you don't have it docked so open up our blueprint SS character and now we want to go into the viewport this tab up here the viewport is just a way that we can visualize all the different components on our character so any of you who are familiar with unity you might remember like add a component and you have like a mesh component and all this other stuff same concept if not all you just need to know is that this is just functionality that is added onto our SS character so our capsule our like an arrow so that we know what direction we're facing a mesh a camera and so forth and really we just want to mess with the camera in this case so that we can customize that and get it to be positioned exactly where we want so if I scroll down here you'll see camera boom if you select that inside the viewport I'm holding down the right Mouse button and using wasd controls to move around while I hold down right right Mouse button just like a first person shooter I guess q and E are moving up and down to if I have not talked about that yet so this is our camera and right now our camera is locked behind the player if I want to rotate it you may try to hit e and rotate it like this but you'll notice that it's not really letting you do that the reason is because there are some settings in here that are preventing that from happening so the first thing we need to do is turn off those settings if you go to camera settings there's something called use Pawn control rotation I'm going to uncheck all of these I don't really want to inherit any of these I want to set the camera position and then have it just follow the player around which is just going to be using the standard inheritance down here right so if our character moves because it's attached to the character the capsule component it will just inherit the position of that movement so we don't really need to do some extra inheritance with the rotations here so once you have these unchecked you should be able to rotate the camera around so what I want to do is I want to rotate it here to 90 or well to negative 90 I guess so that we're looking directly to the side of the character so that then it'll follow the player around as it moves in the level now remember blue is forward direction for our characters so we should be looking at the character like that and a side scroller camera just like this and we can hit compile hit save minimize hit play so obviously our character inputs are kind of wacky and we can move all around we haven't even dealt with the character inputs yet in the movement for now it's just a camera but the camera is moving how we want it to it's just very very close so the next thing is how do we move the camera back well if you come back inside of the blueprint again if you click on the camera boom another thing that this is called is the spring arm component it's renamed camera boom but that is what it's called is the spring arm component if you want to find more information about that the spring arm component allows us to give some extra functionality to how a camera moves and right now the spring arm component has a defined length right here this red line we want to move that further out right we want our camera to be way further back here so this is the target arm length on the spring arm component that is called camera boom so select that over here and Target arm length let's put this something like 900 hit compile and say give minimize hit play all right so now you can see it's further back again our character movement is really weird but that looks a little closer to what I want so the other thing that I'm noticing is that this is very direct like my character stays precisely in the middle of the screen maybe you want that mini side scrollers would do that but I just wanted to show you that if you wanted a little bit of camera lag you could actually get that inside of the spring arm component let's go back in and this is going to be called camera lag if you want to set this so if you scroll down to lag with this spring arm component selected if you select enable camera lag then you'll be able to control some of this you can hover over any of these to see some tool tips now the higher this number for camera lag speed the more it's going to just directly follow the player so if we were to put this down at one just to show you what this would look like and hit compile and save back in and play and so for me for me I'm pressing W and S you see how the camera lags way behind and you know we really can't see what's in front of the player we don't really want that much lag for me I just want it to be kind of subtle so what I've found is to pick a number between 1 and 10 is usually pretty good 10 is pretty instant so I'm going to choose five and see what that looks like but I remember previously from testing that this worked pretty well uh compile save minimize hit play I'm going to click in here and press W and S there's a little bit of lag it's not instant but it's pretty close I I think I do want to be subtle so when I stop you see that little deceleration right there yeah I think that's what I want so I'm going to keep that there but that's where you would actually control that and the last thing that I want to do related to the camera is called the Collision the camera Collision now this is not going to be very obvious but when I start decorating My Level later on if there is anything between the camera and the character that it's looking at on the spring arm component by default it will actually move the camera forward in front of whatever that Collision thing is so if we had a wall right here our camera would instantly hop in if it if it was trying to do a line Trace to the camera to the player and something got in between it would hop in and make sure that it can still see the player but it'll kind of like jump forward and jump back if there's anything here and maybe we do want some walls and things in the foreground here so anyways I want to disable this for now inside of a side scrolling component or inside of a side scroller so I'm going to scroll down well or rather scroll up to camera Collision over here for camera Collision I actually want to disable this and so when I disable this I know that I can actually put things in front of the player in a side scroller so I can hide them behind bushes and make some little secret compartments or whatever I don't want the camera to do weird collisions and move around I just want to have this set so I'm going to disable the do Collision test right there compile save and I think that that's all I want to do for the camera you can see that our character movement is pretty weird still so we'll we'll tackle that next but for now the camera's moving about the distance that I want it has some subtle lag and it is at the projection that I want with the wall and the floor okay so we have our character and if we hit play we're moving around and our inputs are not really matching a side scrolling style input because our you know our WS is going side to side but we want our A and D now in order to fix this we actually have to talk about the new enhanced input that unreal is using but the other thing we want to do is we want to lock the player characters movement to a plane because we just want to guarantee that they're not going into the background you know obviously you can you can do different things in different types of of side scrollers but in this case I just want to lock it to a plane just for Simplicity so I'm going to hit control space to open up my content browse sir I'm going to go to my character not that one the one in the SS game there we go remember we deleted out the camera input so you're gonna see some things inside your blueprint we'll mess with this in a second but the first thing I want to do is I want to go over to my blueprint SS character just click on the root up here and if you type in the details we're going to type in planar and this will lock our movement to a plane which in this case is what we want again depends on your game type but I'm going to click the constrain to plane this little check box right here and then there's one other thing I want to do actually I'm going to set both these snap the plane at start just make sure that we are moving on that plane when we first begin and then plane constraint axis setting we just want to say what axis are we constraining I'm going to select y alright so with those three things right here if I compile and I save I come back in and I hit the play button okay our input is still kind of messed up you see we're doing WS but we notice if we hit A and D we can't really move into the background or into the foreground so this is a step forward now I just need to fix my w and S and make sure that that is a and d which is what I actually want so I'm going to leave that I'm going to come back in and now once I open up my blueprint I want to explain briefly the enhanced input system their new input system uses an action system instead of an old like input inside the project settings like if I go back over here and I go to edit project settings you may not even see this depending on how far in the future but if you go down to input it says that it's deprecated and you can do a lot of things in here but really we're going to do the new system so I just want to show you that if you're in an older version it might be in there but if you don't even see it I mean even better so I'm going to hit control space come down to third person input there's a couple different things that build into this new put system one is my data asset called an input mapping context if I open this up you're going to see that there's something called mappings here these are the different actions that we can create and assign to a character or something that receives input you can see we can customize all this right here but what if we want to create a new action now in our case we don't really need to in our side scroller but I just want to show you the idea of moving is an input action that we Define somewhere else that we are plugging into a map so our map is all the different actions that this character can take so I'm going to close this out now I'm going to come back into my content browser again I'm going to go inside the actions so in our actions we can actually create new actions if we want right like we can you know right click and create that or whatever but we already have some created inside of the template so one action is jumping so if I open up jump you'll see the action here and it's specifying well what is a jump and how are we triggering that we're creating this generic action that then we can configure further same thing with our movement if we go over here right move this is kind of like the framework of what the action is like is it accepting a Boolean is it accepting a an XY like I guess on a vector two what is the type of action that we're processing here and again you know this this can get more complicated we're not going to do anything special we're just going to keep all the defaults just want to kind of talk through this a little bit so if we wanted a new action to our character let's say uh swing sword or attack or Dash or whatever we'd have to create a new action to set this up then we would plug it into the map we would configure this inside of our map so if we expand here back in our map which is where we hold our all our actions we can see on keyboard at spacebar on Gamepad it's whatever it is on Gamepad so let me open up move you'll see that on move we are processing a lot of different inputs to get one output value which is what we're going to use now you don't need to understand all this you just need to kind of like see the context of you know how it's being used all you really need to know is that we have an action called move and we are going to get an X and A Y value that it's it's using by you know am I holding a and w or just W or s or D or whatever and really we're going to just receive an ad input and we are going to do something based off that so anyways just to recap all this our actions that are inside of our map and then inside of our our map we are actually just defining what are the buttons that that we are receiving to do this so anyways that's our context and so if I go back into my blueprint over here this add input mapping up here is actually pretty important all this is doing is this is assigning our context remember our our action map it is assigning our context to our player controller that then we can use to receive input so this is just assigning our action map to this player controller so we actually need all this and then we can Define which action map we want to assign right here but this is the default one which is what we were just looking at which one of those things inside of this action map was movement so once we've done this down here this is just listening to the movement action inside of that action map so again that's all like a much larger tutorial but for now all you need to understand is that you know we are listening to that action map we are listening to the movement and then we can do things so if we listen to the uh the X movement inside of that action that is going to be our A and D if we listen to Y that is going to be r w and S we actually don't want forward and backward right that's going to be our vertical our our y so we don't really need that so I'm going to go over here and I'm just going to delete this out because we want our left and right I'm going to delete that over there too because we just want our X for our side scroller if this is the top down you might want more than that but we just need our x in this type of game and this is doing some additional things that we don't really need for a side scroller we're just going to go in World space just to keep things very simple so I'm going to delete these two nodes out right there as well this is called a reroute node we're going to delete this and delete that and just plug this back in so this is action value X plug this in to scale value right all this is doing is saying if it's zero we're not going to move at all anything times zero is zero so one times a direction is just the direction so let's let's just re do that right there so what we were doing is we're listening to move and we are receiving the value X from our movement which remember is an X and A Y but we only care about the X which is our side to side which is our a and our d so if we press a it's going to be negative one if we press D it's going to be one we want to know what direction to move our character we want to move in the X Direction so if I go to x and I hit one so what this means is that inside of our view if we are moving in negative One Direction that's going to be to the left if we're moving in positive One Direction on our X that's going to be to the right long story short if we press a we're going to move in negative 1 we press D we're going to move in positive 1 x hopefully that makes sense character movement can be kind of weird and confusing but if we hit compile hit save and I think that'll be it let's test it out hit play all right so so we can see we're actually moving in left and right with our A and D and we if we press W and X it's not really doing anything right just our A and D which is exactly what we want which is awesome so I know the new input system is oh there's extra steps it's actually more modular and that we can add and remove actions without having to mess with a lot of other things and create errors but it is a little bit to kind of like wrap your head around at first but this is the short version of just how it works but really what we need to do to make our side scroller okay now let's talk about rotation speed so if I hit the play button see right here how my character rotates left and right but if I want to turn around really quickly it takes it's a little sluggish right like it just feels very heavy and and I may not want that feel maybe some of you might want that and that's fine but I just want to show you how you could change that if you wanted to if you wanted to make it feel a little bit more Snappy so I'm going to open up my blueprint character again so if I click on my SS character up here and I search for rotation you're going to see some other things down here but what we're looking for is something called the rotation rate so if I scroll down right here under character Movement we have 0 0 500. this is how quickly it's going to rotate on which axis when it's trying to move a Direction so what I want to do is I want to just bump this number up and I think maybe 900 maybe a thousand something like that would be fine depending on how fast you want it to rotate so this is going to feel a lot snappier actually let's do a 1000 we'll hit compile and hit save and we'll hop back in hit play okay and now it's a lot snappier we could bump that even more if we want right like you keep pulling it upwards and upwards if you want it to feel very Snappy right like you could you could really go 10 000 just out of zero it's gonna feel pretty near instant right I've also found that if you put negative one it it's instant as well but you know I don't know if that's going to cause other issues so you could just bump that as high or as low as you want it I'm going to keep mine at one thousand I like a little bit of sluggishness so the last thing we need to talk about is making our jump feel better and there's a couple different settings we can use to do this so if I jump right now it's kind of low like it's not very high for a platformer it's also very kind of floaty especially when we factor in our rotation let me show you how you can adjust that to how you want so if I go back to my blueprint over here I'm going to select my character movement component down here and you're going to see a lot of extra options I'm only going to talk about the major ones just to get you started and let you tweak the major ones but you can fine tune all the stuff if you want so the first thing I'm going to do is I'm going to search for uh jump Z velocity this is how high I want to jump before we jump not very high I'm just going to bump this up slightly I actually want 800 compile save and let's see what that looks like all right I think that's good in some games you might jump even higher than that but this feels about right to me okay now for the floatiness I want to show you that the floatiness is caused by not breaking in mid-air so if I uh back out of here what I'm looking for here is breaking deceleration by Falling you can see all of our other jump settings it probably just should have filtered this but either way breaking deceleration by Falling this is how much we want to slow our movement just by Falling whether or not we're pressing the input so for example if I put 500 here it's default to zero so we're just going to carry on our acceleration but we want to break while we're falling if we're not pressing anything so 500 is the amount we're breaking so if I hit play and do this again you see if I let go of my key how I I'd slow down which may allow us to fine tune our you know where we're landing on a platform below us but we still maintain our full acceleration if we hold down the key so that's kind of nice right so I just want to be able to let go and not continue moving so we'll keep that again you can further fine tune this if you want air control is the other one that I think is worth mentioning so air control is the percentage of control we want while we're in midair so in other words 0.35 will be 35 percent we had 35 control while we're in midair I actually want full control in this particular game I like the snappiness of it but if you only wanted partial control you could bump that to 0.7 anything between 0 to 1 would be fine I'm going to leave it at one and show you compile save go back hit play and so it's very Snappy now and combined with our deceleration I think this feels pretty good for my platformer again you can tweak even more the settings there I just want to show you the major ones poke around try some stuff but I think this feels pretty good for the general jumping or our character controller okay and the last thing I wanted to mention is over here if you click the blueprint SS character self over here at the very top if you scroll down here under character some of you might want varied jump Heights so if you barely tap the space bar you want to jump a little bit but if you hold down the spacebar you want to jump a lot I've changed mine to 0.3 and this just allows us to continue to add jump Force while we hold down the button so what this means is if you add a Max hold time you'll probably need to also go back under the character movement and if we type in jumping come back over here and you will probably need to turn this down a little bit because we want to continue to add it while we hold down the button so you want that to be a slightly smaller amount so basically determine the minimum jump height you want and then determine the maximum jump height by changing this value and clear my field over here and this value over here on the self under character right here you can also add you know multiple jumps if you like but I didn't do that I just added 0.3 for Max hold time and then 500 jump height was what allowed me to get this effect right here don't worry about that extra character over there um this future video so we can do a minimum jump and then we can do a maximum jump so if you want that effect that's where you would find that it's a little tricky it's just on the character right this the character self rather than the character movement so I wanted to point that out for you all and um with that I think we have our basic character uh with our jumping you might hear some sounds which I'll do in a later video and I'm kind of adding this on because I forgot to clarify this but you can see we can move around we can jump high we can jump below we can slightly slower speed while we jump we have some air control we have some rotations and this is overall this is how you can set up a really basic side scrolling platformer from the third person character template that we get provided with unreal so thank you for following along and hopefully you're able to continue to build off of this into some uh cool new projects so thank you
Info
Channel: ACDev
Views: 3,810
Rating: undefined out of 5
Keywords:
Id: QdRj_hEbs8A
Channel Id: undefined
Length: 43min 42sec (2622 seconds)
Published: Mon May 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.