Unreal Engine 5 Enhanced Input Tutorial Masterclass for Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today's video is all about mastering the enhanced input system in a real engine 5.1 and onwards in any type of game or virtual experience the way you control your character is one of the most important aspects of it if the controls feels sluggish and the reactions feels delayed it won't matter that your game looks beautiful people just won't play it in this comprehensive guide we will cover a wide range of topics to help you unlock the full potential of your game controls inside your Unreal Engine projects elevating the player experience and making your games more accessible to a wider audience learn to create an action game in a real Engine 5 at unfgames.com the first thing we need to do is create a project that we can use with a new enhanced input which is any project from the 5.1 onwards in my case I'll use 5.1 and let's wait for the launcher to load in the unreal project browser let's go to games blank project and let's give it a name we give it a name let's click create now we have the blank project that we can use to start doing stuff within has input to start what you need to know about the enhanced input is that it provides developers a way of adding Advanced input features to their project like complex input handling or runtime control remapping we can also add Dynamic contextual input mappings when we need and it's a way to deal with with a large number of actions that behave differently depending on the current state of the player so this system has four main Concepts and I'll just create a folder so we can add more stuff enhanced input basics the first one is input actions you can create an input action by right clicking go into input and input action if you do not have this for whatever reason make sure that you are using the unreal version 5.1 onwards so let's create an input action this input action usually you want to call it in production underscore and the name of the action could be Crouch could be fire weapon let's just call it fireweather now an input action is a data asset that represents something that the user can do like Crouch or like firing a weapon so this is an asset that will represent the action the next thing you need to know is about input mapping context let's create one input input mapping context and usually this type of assets you will find it that they are called input mapping context and the name of the user or the name of the actual character that will perform the actions usually you just call it player or you can also call it default I'll just call it player the input mapping context are a collection of input actions that represents a certain context that the player can be in they describe the rules for what triggers are given input actions and these mapping contexts can be dynamically added removed or prioritized for each user so we create actions in Productions and we put them inside input mapping contexts so if you double click an input action you will find this information an action description if you consume an input trigger when passed and more stuff that we will touch later by later I mean in a few minutes and in the input input mapping context you will see these mappings if you add a mapping you can select an input action here and here you can select the actual key you want to bind to this input action so for now it's pretty straightforward you want to shoot with your left click you search for the mouse left Mouse button you can also click here and press any key or press the actual Mouse and it can bind pretty easily now you will find this to categories triggers a modifiers that are also part of these four main Concepts the first two are input actions the second one is input mapping context the third one is input modifier these are preprocessors that alter the raw input values that are real engine receives before sending them to the input triggers so these are the modifiers you can add new modifiers either in the mapping context or in the input action and let me delete it in the input action so the way modifier works is that they modify the input that it receives for example if I'm going forward with my left thumbstick probably that thumbstick will give me a value of maybe one if we negate that value it's like multiplying it by -1 so we are modifying the current input so we can get an inverted scheme so when I press forward in the thumbstick I'll go backwards and we will see concrete examples in a minute I just wanted to let you know that you can modify the information that the inputs give us we can multiply it we can negate it we can smooth it we can create that so we can do a lot of stuff with the modifiers finally the four the fourth concept is input ringers and they determine whether the user input whether after passing through an optional list of input modifier with which is this one they determine if the user input should activate the corresponded input action within its input mapping context which is this so what does it mean I can specify with the triggers what do I mean by firing a weapon is firing a weapon means that I need to hold and release the button does it means that I just need to release it I just need to press it I need to do a combo action and we will see also little examples of on how to use these triggers and what does it mean for an input action to get triggered but this is the Core Concepts the main four Concepts which is in Productions mapping Concepts oh excuse me mapping context modifiers for the inputs and how to define when is my input trigger for this next part what I want to do is make a comparison between the Legacy way of doing inputs and the new way to do that we're going to import a character from Paragon which uses the Legacy inputs so let's go to the unreal launcher just click on the marketplace and search for Paragon Aurora so if you search it here you can type Aurora well you can type it maybe I can't and just select Paragon Aurora and you will see this asset this asset is free so I can just add it to my project let's search for my project enhanced inputs here it is if your project doesn't show up you just need to clone click on show all projects and it should appear so I'll just search for a project was it procedural if your project shows you this error you can always select a previous version now it seems that they have updated it so I must input oh let's see if they updated it let's add it to a project just put yes sometimes that message message appears and it's even though we don't have the the actual asset so let's wait I'll just minimize this now we see in the folders that a paragon Aurora folder has been added let's click on it characters Heroes Aurora and here we will find the actual character blueprint to use it I'll just create a new level a basic one so it doesn't take as much to load I'll drag and drop the Aurora character and here in the details panel I'm going to search autopossess player and you can click on General you can type here Auto possess and in Auto process player let's select player 0. and let's clean our search now whenever we Press Play We will possess this character which means that we are playing as this character you will see that we cannot move it around but we can click to attack let's open the character and see why this is happening so we can right click the character edit we can also browse to the asset and double click here in the content browser and let me just close the other assets and here we have our character we have this icon because input actions and input axes are not set up we can click to attack because here we are using the raw input value so here we have the row event and if for some reason here where's the movement forward I decided to just connect the W key it will start working but that's not the way you usually do stuff maybe for debugging or testing but usually you will find input axis and for the jump input actions now the old way of doing this is going to edit project settings and in the project settings which I'm going to enlarge we go to the input category here there's action mappings that are used for specific actions for example the jump and we can create one click on the plus button type jump and now here we can select the key which I can click on this button and press spacebar with this if I compile my input action will no longer give me a warning and when I play the game you will see that I can still attack and if I press spacebar I can jump now that that is action mappings which are well which were very useful for actions that are very specific that you just want to know if you press the key and whenever you released it so you have here pressed and release now the other mapping that I will need to move my character is is the input axins and the input axis move forward is giving a value this is especially useful if you have a thumbstick because a thumbstick will give you a value between minus zero minus one and one so if you're not doing anything you get a zero value if you press a little bit forward forward you can get a 0.2 Bali if you go all the way you get a one type of body so to create that we can hear axis mappings the new axis mapping will be called move forward and here we could bind it to the GamePad and bind it to the Gamepad left thumbstick y-axis because it's forward and backward and this would work but if I needed to use the keywords we will need to we don't need to create another another axis mapping we just need to add another key mapping which is through this plus button now here I can select my w key and if I want to go backwards I can add another key select my S key and here I want to modify the value because when I go forward this should be one but if I go backward it should be -1 so I just I'll just multiply this key so whenever I press s we're modifying the input received this gives me the information that the S key was pressed if it's zero is not pressed if it's one it's pressed but we are also modifying that value multiplying it by -1 which is also called negating it now this way if we compile we see that this is removed if we play we will see that if I press s I'll move forward if I excuse me if I press W I move forward and if I press s I'll move backwards so that's the way the old system worked but this changes a little bit in the newer now what we need to do is pass all these inputs and I'm going to just minimize this screen just so I I have it at hand I need to create new actions for a new system and replace the the old events so let's start with the jump which is the easier one we talked about inproductions now an action that we can do is jump so let's create that right click input input action in production jump and I believe the normal the the normal the the third person example uses jump so I'm just going to call it character jump you can just call it jump but I know that this there there will be another asset that will be called jump so that's why I'm just calling it another another name so this is my action the character jumps I would just call it Jump by the way but now this action I want to determine if it's like an inproduction that on I only want to know if it's pressed or released or if it is an input axis where I need a value that goes from one two from -1 to 1. the jump is pretty straightforward so if I double click it the value type that I will use is digital bull I only want to know if my character excuse me if my player press the key or not that's the only thing I want to know now I'll create oh let's go let's continue with the character jump yeah I'll go to the input mappings and I'll add a new mapping here I need to select the new input action which is the character jump and here I will bind my spacebar do I need to modify it no do I need to change the way these triggers we will see if you needed another key again you can add a new key here and you will get the same options for modification maybe I want my gamepad to be able to jump with the face button button so this is the the button this face button button is the usually the a button or it could also be was it the circle now the x button in a PlayStation controller so this way our character can jump either with the spacebar or by pressing the GamePad so we have this context where we can fire a weapon and we can jump but we need to tell our character to be able to use that context so we need to add that mapping that input mapping context to this specific character so let's go to the begin play here we don't don't have anywhere to add it and usually the mapping contexts are either added to the begin play or to the on possess and I don't have it here we can go to function and search for possessed and I'll drag it to the top possess event so it's either to have been in play or do the possess event be in play because whenever you're playing at the start of the game maybe your player needs to move you will add it here if you don't want to do the do it that way whenever we possess this character means that our player controller which means that our player is going to send inputs to this controller this happens automatically most of the times you can also add it here if you will be using multiple characters I would add it here if you are just going to use one just begin play it's fine and oh it will also depend on when the player will get to play or not but in our case begin plays worked perfect so to add the context we need to get first the player controller so we will get the controller and the controller is a little class that handles the inputs of our player so if I'm going to control this character our controller which I'll try to draw a simple controller hopefully that looks like a controller and here are the buttons okay terrible controller okay but you get that gist the brain of the character will be the inputs that we give them and if those inputs come from a player this is called a player controller now this does not represent the actual controller in your hand or the keyboards this represents the the wheel of the player the actions that the player wants to take this don't doesn't actually represent the hardware keep that in mind now for the player to move a character this player controller needs to possess a character so when you go up or forward it tells the actual character to go forward or jump so a player controller possess a character which is actually a bound but let's just not get into the specifics of it and this way we can make stuff happen whenever we press W the player controller process it it sees it looks for any character that it's possessing and because it's possessing which if you remember correctly we we are out of processing this player that's why the input happens inside this character now we can get the controller inside the character to see who is controller controlling this character we want to check if this is a player so let's cast this to a player controller now this player controller has inside it the enhanced input subsystem so let's search for it here it is enhanced player local subsistence again I I believe I press enter too fast here it is and from here just in case it's a good idea to check if this is valid so again I press too fast is valid has two flavors one is a function which returns a Boolean one is this macro you can use either one of them by using a branch node which I just type if and it's immediately give me the branch both of these will work the same so let's just use the macro and after we check that this enhanced input local player subsystem is valid it exists in the game then we can add the mapping context so from here from this node we will drag a new one let's type add mapping and this is the one we are looking for add mapping context so the mapping context and I'm going to connect it to is valid is the one that we have created here where we can jump and we can fire a weapon so let's select it input mapping context player now with this done nothing will happen just yet but we have determined that this character that is being possessed by my player will be able to use the actions inside this input mapping context which are actions that we have created previously here so we need to use those Action Now inside this character and it's a good idea to always comment stuff I don't really like to comment that much because my perspective on it is that the code should be readable readable enough for me not to comment but if you want to add comments like it's fine if you're learning especially and you are forgetting a lot of stuff it's specially useful to add comments you just select the nodes you want to comment and press the letter c and if you didn't understand my accent I'm referring to this let so the C letter and here we can type adding the player mapping context there we go within with the input mapping context added we can start using the actions which is I'll put it near the actual action input action jump this is the old way of doing stuff we right click on a empty space and just search for the name of your input action in my case it's called character jump so I can just go i a underscore and here it is character jump you have the input as an event and you have the value we will get the value with the event so I do need the event so let's click here and you will see that it's a little bit different just for it to work I'm going to remove this we're going to explain these states in a minute and I'm going to connect started to the jump and I am going to connect completed to the stop jumping and we can move this here I'll just copy the text delete the comment select this create the comment and paste the text here let's see if it's working can I jump I can now if I press shift F1 my mouse will be released so I can hold shift press F1 my mouse is released and with my mouse my mouse I can move my window so I can see if this What's Happening Here Yeah if this is working so first click here if this was not selected it now is the time to select our player character this is the debug way of selecting which character do I want to see and now let's go back to the game click on the game and press spacebar and you will see how the nodes light up how the wires are telling me the execution flow of this and you will see that depending on how you press the space bar you get this started always immediately but the completed action will all always release well it will always trigger when we release the key so I can hold the key and the completed action will not trigger until I just release it if I release it immediately then you can see the wires turning on on Earth and we'll go into details why this happens but what we do know now is that our jump is working correctly and you have created the first input using the enhanced input system the second input we're going to create is the camera movement so for the camera movement we have two inputs turn and look up let's start with the term for the turn we need to create again the action to do the turning so let's go to input in production now let's call it in production turn and I will also create a look up I'll just and first open the turn and this one is an Axis or at least it says here that it's an axis so we will need to receive a value between -1 and 1. this will get determined by either the GamePad or by the mouse so we no longer need just to know if it's pressed or not we're gonna click here on value type and we will select axis 1 D which is one dimension here it says a float so let's select it let's save it and in the content browser or content drawer let's duplicate this and in the Aurora player character we will see that we also need a look up so we have created these two input actions we need to determine now which keys do we want to bind to this action so in the mapping context again I'll select the turn and here I'll select the lookup for the turn I want my mouse in the X axis so if I'm moving my mouse from left to right I want my camera to turn and for the lookup Mouse Y axis so when we move it up and down we get the the camera move if you want to use the GamePad we can add it and this will be game pack left thumb stick X and in the lookup is gamepad left thumbstick y so everything thus far is pretty similar let's save it you will see that you can get um a little bit of trouble when you have an input modifier that it's null whenever you have any type of null values or for example if you just created a new a new key and you didn't put anything in it you will receive this type of warning you just need to see where the error is and it's complaining about a null input modifier on one key mapping the key mappiness are these ones and they were working correctly until I added these two so let's see if there is a modifier in one of them here where did I put a modifier then here spacebar modifier none this is what it's making me not able to save or it's showing me that error because this is here so we removed move that modifier save it now it's fine now with this created let's go back to the character and let's change this inputs and we can delete this in production and the we can close this one let's right click and let's call come on input access turn the one that we created was input action turn and the other one is input action lookup and now this is where things get a little bit different and I'm going to move my enhanced input to the side so I have a little bit more of space here it is mouse input the turn I need to always know whenever we are pressing the value so using started won't help me that much and again we will go in depth to what each of these states are how can we manipulate them to our liking but in my case I want to use the trigger because this will get triggered as long as I'm pressing the button and even if I'm not using it if it's zero then it's fine if it's triggering because we will get a value of zero and nothing will happen now this is fine but we need a value and because we defined that our input action input action turn is an axis we will get the float value here so we just need to connect it we can delete the input axis term input access lookup trigger and connect the action value like this now let's see if this is working let's save and compile let's press play and now you see that we can move our our camera but there's a little bit of extra movement that I'm not really liking now why is that I actually don't know but we will see in a minute yeah something's real in this oh it was my it was my controller let me just uh turn it off yeah it was my controller adding the input Okay so you will see that it it's moving with the mouse and I just noticed that for my controller inputs I I messed it up so let me just fix it real quick gamepad oh the turn should be the right right thumbseek X and in lookup it should be a Gamepad right if I'm sick why okay so with my controller turn off I can press play and see that whenever I move the mouse left and right we are looking we're turning we were turning our camera and whenever I move up and down we are also turning our camera but only up and down now I I don't really like how it moves up and down I prefer an inverted type of of controls so whenever you move your mouse up you're actually moving the camera the other way so this is where we can modify the input I want to invert this lookup then I can go to the input mappings go to look up Mouse modifiers and here we can negate this this will multiply the value by -1 and when we test it again you will see that whenever you go down your camera will invert the movement and for me this feels a lot better so that's why I always set it up like this if you liked the other way of handling it you can just ignore the the modifier and and go go with it and I I will add also the modifier for the the GamePad and example for the GamePad input and taking consideration that these modifiers and triggers can be added here in the mapping context but they also can be added in the input action so I could also negate it here this will need to this depends on what you want for example and this is actually a good example that I didn't have written in my notes the lookup in the con made in the mapping context I'm negating it so I can flip the the controls right and if I wanted to negate to invert also the controllers for the GamePad I will need to create the negate again but if both are going to have negate then I can just go to the input action and add the modifier there save it and I can delete this modifier otherwise I'll negate it twice save this and play and now whichever key I map to this action it will always be negated in this case that is exactly what I want but there may be cases where you don't want that so if you don't want all the keys to be affected by the same modifiers then you can select the modifiers and triggers individually by each mapped key with the camera working what we need to do is make the character work again so our Mouse input is working correctly we no longer need this Gamepad input because here we are modifying it by a turn rate which is a multiplication but if we wanted to do the exact same thing we can add a modifier turn rate you see that it has a 45 value which are we are multiplying by the axis value and in the lookup rate it has the same number so in our mapping for our Gamepad we can add that modifier which is a scholar and we need to Define by how much we want to multiply so we can just fill everything to 45. so you you you're finally seen why the enhanced input is making stuff easier we don't really need to worry too much about extra logic we can just put it in the mapping context and I will do the same for the turn again I'm only modifying it for the GamePad modifiers color and 45 in every in every space okay so far so good we can delete this and instead of this being called Mouse input we can just call it camera movement imp now we were talking about the movement input and here I will do a little bit of extra stuff because we can do exactly the same and create uh in production for the move forward event and for the move right but we can also and let me save everything we can also go to input create a new a new input action call it input action movement open it I can close that lookup and here in the value type instead of using the axis one dimension we can use the axis two dimension this is especially useful if you are gonna have input coming from a thumbstick because the thumbstick or any type of stick has two Dimensions either forward backwards left right and all the diagonals so the camera movement we can also do it this way but I I wanted to show you a a simple way to do it the normal way to do it so you can choose whatever suits you the most so in this case for the movement I'm gonna use the axis 2D axis 3D usually is for motion controllers because you you will have up and down not only front right left and back you will also have up and down but in this case I'm not using this this is usually for br because I'm using a thumbstick or I may use a thumbstick I'll use axis 2D let's save it let's go to the input mapping context and let's add it here where's my movement here it is now this movement will be mapped to two values and not not the left Mouse button if I'm using a Gamepad I want that value to be the left thumbstick to the axis and that's it and if I'm using the keyword I don't remember if this is it but we will check but for now this is for the keyword let's type w add another one type S add another one type D another key and type A W S D A or w ASD was whatever you want to call it that's the keys that we're gonna use to move around now if I leave it like this every time I press one of these Keys it will give me the value in x positive which is 1 in X which should be the right one but if you're not sure and you don't want to remember all this setup when you want to test this stuff it's a good idea to play around with this type of inputs so let's see what's happening in the Aurora player character let me remove this by adding our new movement here I have an action value which is a vector 2D I want to split this so I have the egg value in X and the value in y so far so good for the forward I want to connect this whenever this is triggered I want the value in X to be used and I can delete this and also when the input is triggered I want this move right node and I want the value in y why am I doing it like this well actually I don't know because in a in a controller whenever you go forward and backward that's the Y value and whenever you go side to side that's the x value so let me change the input actually X should be for a right so the scale value here will be from X and the Y value will be for going forward yeah that that makes at least more sense to me okay so let's delete this and we can increase the comment section so if you want to move forward use the volume y if you want to move side to side usable Linux you can interchange this and we can make it work but for now you can just leave it like like this okay we have connected the input action to the actual movement if we press play and press w I'm moving to the right if I press s I'm moving to the right if I press any of the keys I'm always moving to the right this means that when I'm using an input action that uses a 2d vector by default any key map to it will make it move to X positive which in the case of D this is correct is fine in the case of a I just need to negate it so modify it here we are in the a key modifier negate so we go to the other side if we press play and I'm going to use the hotkey alt p to play it if I press D working fine if I press a working fine if I press s or W is not working like it should W should send me a y coordinate so we need to switch where does the value of w is sending the input so we need to modify again the input modifiers add an element and here we will find Swizzle I don't know if that's how it's pronounced but so it's all input axis values which says useful to map a one-dimensional input onto the y-axis of that to the action which is exactly what I need right now so let's Swizzle it go to S again Swizzle the values and negate the value so we can go backwards let's save it Ctrl p w going forward s going backward B going right and a going to the left now I will try it with my gamepad and let me turn it on and let's see if this setup is fine I'll be you can see that it's moving by itself a little bit if I and I'm not pressing anything if I start moving my my left thumbstick it is moving around if I move it a little bit to the front you will see that it's doing this running animation but slowly and it really depends on the value I'm giving to my thumbstick the same will happen if I if I try to move my my thumbstick is doing that because remember that we are modifying the the turns I believe we don't really need this scholar for for the for the actual thumbstick if I remove it and play it then the the thumb stick oh come on where is the lookup here it is modifiers I'll just negate this nope negate it's fine okay hopefully no more panty shots perfect yeah so you will see that I'm getting weird Behavior and it has to do with the actual value of these sticks whenever you're using a thumbstick you need to take in consideration that whenever you release them they are not always they will go to the zero value they will have a little bit of movement like 0.00 to 1 and that's making my character do that stuff a way to fix this is for the game put gamepad uh where's the movement here Gamepad movement is to add a modifier and we can add a dead zone which it means that if it's lower than this value then I don't want to use it and if it's higher than this value I also don't want to use it in this case the default value is actually fine you will see that our character will no longer flicker because we're ignoring values that are lower than 0.2 and it should be a good idea to also add that that um that that sound too to the turning so let's add the modifier that's on the lookup that's on and we can stack modifiers which is actually pretty nice you usually want the dead century the first one and then you can modify the values on top so now we have our character moving correctly if you wanted to avoid like this character doesn't have any awoken animation and you want to avoid this then you can hear in the mapping context in the movement for the GamePad key or mapping in the modifiers after the Edison we can add as color again and we can multiply it by maybe 50. so we all always get the full value now if we press play even if I'm putting my my thumbstick a little bit forward it's always moving the full the full Direction the full motion it's not letting me walk a little bit because I didn't have the animation for it yeah so that's a good way of implementing the movement and modifying the values to get a better result for your game let's go back to the character and we will see that we have finished implementing this this reset VR orientation I really don't really need it oh this left this attack that I do really need to implement let's do it really quickly so we can finish implementing the Legacy Legacy inputs to the new one so here I'll just change this fire weapon to attack because they work really the same attack digital input is fine movement I can close it and the attack is left button and also for the GamePad this will be what did they map the face button left so again oh I have my Gamepad connected so I can just press it face button left this is fine we have already done this so that's why I'm just speeding through it attack and here because I just want to know if it's pressed or released here impressed go to start it you can drag and that pins that way if you go hover the PIN press was it press shift hold shift and click on it and you can hold it and you can oh you can duplicate the pin the pin connection like this if you hold shift if you hold alt you can remove it and if you hold Ctrl you can move it around I I should do a tip on on that on maybe a shirt could be could be good but yeah now we can build this because I just wanted this to start and now everything should be working my attacks my jump my camera movement and my overall movement now that you know how the enhanced input works it's a good idea to check the third person example because they do things a little bit different let's go to the content drawer add add feature or content pack and here you will have the third person example yep so blueprint or Simplicity plus if you're using it third person example blueprint and add it to the project let's wait a little bit now that it's added let's go to the content drawer and it should be in third person blueprints third person current you will see that these sample character is doing the same thing we add the input mapping we have input actions in this case they did the camera input in the same one they just call it look movement input in the in the same in production jump and that's it I was telling you that it was a little bit different because here the x is what they consider to be I believe I left and right and forward backward yeah I believe it's the same it's the same setup and in terms of inputs you will have the your actions which are the same and you will have the inputs for mobile devices which is just touching inputs for the arrow keys the GamePad adds the modifier that sound and its color oh you did the same thing they didn't multiply this because it's not needed because the the left thumb stick will only give you X and Y and in the look instead of using Mouse X and mouse why they you you can use the amount X Y to the axis to get the same functionality and here you have a negation so so you can invert the the scheme so yeah and the negate probably only negates one axis the y-axis yeah that's what I thought is the same setup it has these its differences but the overall implementation is the same so let's close it you are no longer I and a stranger to the enhanced input system and you will see that a lot of examples are still using the Legacy system and now you can Port them to the new one that specially Rings true for our tutorials that were done with previous previous versions so if you are asking for the enhanced inputs in the in in those tutorials in those all tutorials I will redirect you to this video now that you know how to create the inputs it's a good idea to go a little bit in depth remember I told you that we were going to go a little bit more into what these states mean well these are trigger States a trigger State represents the current state of the action so to show it better I'm going to press play I'm gonna go to the enter command text box and here let's type show debug space and enhanced input this will let me and I'll press enter this will let me see the actual values of our enhanced input so for example if I'm moving forward whoa whoops let me click actually in the game so we have control of our of our character you will see that whenever I'm pressing a button stuff is happening at the left side now for example if I press w here I'm seeing the action that is being activated that is being used in this case is green so it means it has been triggered a triggered action means that it has completed the evaluation of all trigger requirements and it's been triggered for example if I have a press and release trigger then the trigger is sent when the user releases the key and let's do an example of that so you see here that the movement is triggered and you can see that key that triggered the movement which is the w for the attack we have a click let's go back to the player attack left Mouse button and let's modify this trigger let's say that this will be press and release hold on release and this hold on release and we will go into more detail about each one of these ones but let's for this one it's pretty easy to know what what you should do hold on release hold time threshold means how how much time do I need to hold the key so let's say two seconds the actuation threshold means if the input needs to be about Above This volume if it's a key it will always be from zero it will be always zero or one if it's a thumbstick it may be from 0 to 1 or minus one to zero so you can modify this actuation come on actually actuation threshold there it is or at this half of the war so you can choose this threshold based on this value and affected by time dilation means if you are modifying how fast or how slow the game is running you can select if it's affected by it or if it isn't so these two seconds could be longer or shorter depending on how fast your game is going so we have this attack we have changed that trigger to hold and release let's save it let's go back to the test map and let's activate again the show debug enhanced input if you click on the text box and you press the arrow key up Arrow key you will see the last commands that you did so we can just press that enter and now we have it so for the attack if I press my my left click you now will see that the action is no longer green is yellow so right now it has a ongoing state but before entering ongoing it has entered ah started and if you can't see it some people like to see my horrible handwriting oh is this not working I'll draw it with a mouse then start it before entering and going the started state happens so it happens whenever they trigger which is the hold and release Begins the evaluation so whenever I press the button the started State happens now because we need to hold the button for two seconds we are not triggering this event this action we are still evaluating if this action can be triggered so it's ongoing when the trigger is still being processed for example in this press and hold action is or it will be ongoing while the user is holding down the button before the duration that we specified before is reached now depending on the triggers this event will fire every tick while the action is evaluated once it receives the input value so we can see it now in real time I press the button ongoing whenever I reach that two seconds it's still ongoing because our trigger event is hold and release but now I have pressed I has I have hold the key more than two seconds so when I release it it will get triggered and it will be very fast but you should see a little bit of green did you see it you didn't saw it okay I can change the hold and release to just hold and I will hold it for three seconds let's save it go to my map and press play oh I need to shift F1 up Arrow key enter and now I should be able to see it I press now it's ongoing and when it reach that the threshold of three seconds now it's triggered so how does this look for my character now you will see that my character was always attacking is because I was using the started event and every input action whenever it starts looking if it's going to be triggered or not it always triggers this started state so if you wanted to look how the pins actually looks like I will show you trigger started ongoing for now we haven't talked about canceled yet so let's press this here and whenever I press my attack it starts right now is ongoing and now it's triggered and it's firing everything until I just released my Mouse now the console and the complete event are kind of similar the complete triggers you enter the complete State let me rephrase that you enter the completed State when the trigger evaluation process is complete and you enter the canceled State when the triggering was canceled for example a user lets go of a button before the press and hold action was triggered so let's test that let's connect this to canceled and connect these two completed so we need to hold for three seconds so I'm holding it where I'm going triggered means that I have fulfilled the three seconds but I have not released the key yet when I release it it should print completed and it does if I'm holding it again and release it before we complete it then we go to the cancel state and that's how the is that trigger States work and we can do a lot of stuff with these trigger States let me just remove everything here connect back this started compile and Save and in the attack I'll just remove the trigger that I added here just to have everything clean say full and let's continue let's do a super quick example of using those trigger states that we just learned let's open the character again I'm gonna use Ctrl e and here let's go to the jumping part so we have started and I completed the state we have a jump and a stop jumping right now this may not mean too much for you but for the character class you have the ability to hold the key and depending on the number of seconds you're holding the key you can jump higher you can enable this functionality if you go to the class defaults and you search jump here you have stuff from the movement component which is this one but again I'm gonna click in the class default what I'm looking for is here under character and here you have a jump Max hold time which is the one we're looking for and the job Max count which itself also useful right you can use this to have a double jump very simple you just put two here and you press play and now you can have a double jump the other one lets you hold the key so here it's really important that you know when the key started so you can jump and win did it end so you can stop jumping so in our case again click class defaults I'm going to change the value inside jump Max hold time and let's say I wanted 0.5 so you need 0.5 seconds holding the jump key for our character to get the maximum height so you press play now and if you just tap the key the spacebar key you get this little jump if you hold the jump key you can get higher this is a functionality especially useful for any type of Platformers so you can really get super precise when or where do you want to fall and because we have also activated the double jump you will see that I can double jump using the same functionality the next topic will be the input triggers input triggers determine whether user input after passing through an optional list of input modifiers that we have already seen how they work well after passing through them we determine if the input should activate the corresponding input action within its input mapping context so if we go to the input mapping context you will see that in any of our input actions we have these triggers which those are the ones that we are going to see right now so after passing through the modifiers that modify the raw input we can determine if the input should Trigger or not and there are a lot of ways here I'll add a I will add an element and you will see a lot of ways that our input can trigger and I'm going to create a little example so you can see how you can use each one of these inputs for this I'll create a new input action which it's going to be similar to the like the attack but let's just duplicate this let's call it heavy attack and this heavy attack yeah it's fine consume input I only want to know if it's pressed or not it's okay and you will see that you can also add triggers to the input action by itself so let's just save it here we we just clean everything and I will add it to my input mapping context for now I'm going to use this input as a test so we may change stuff in the feature I will click here and then I will right click so it's mapped to the right Mouse button right so let's start with the down trigger down now to use the input I do need to add it here if I want to do something with it if I don't need to do something right now we can still test it if we go here again let's use our trusty show debug enhanced input and you will still see that the heavy attack should be somewhere here here it is and if I press the right click you will see what's happening now now right now my my trigger my trigger is down which is the default Behavior it will trigger as long as the key is pressed so as you see right now it's not triggering as soon as I right click then you will see that it's being triggered let's change it let's stop execution and here let's go to the next logical one so we can build on top of each other so we know what down means as soon as the key is down is pressed then it will trigger now pressed is different if I select press press triggers only once so it triggered once when the key is pressed holding it won't trigger it again so again I will save this I have some invalid data which could be probably I just left something here this one yeah that that little test that I did that counts as invalid data okay so again heavy attack let's change it to press and whenever we press play I'll press the up key so I can redo the command you will see that here in the heavy attack the trigger it triggers triggers so fast we don't even see it but you can almost see the green there so this is triggering but only once we can double test this double checked it by having here the actual heavy attack and hearing trigger we add a print string hello compile play and whenever we right click it says hello perfect the next one that we're going to see is the hold or no let's continue with the released because why not so released released has an ongoing state and will trigger only once when the key is released so what it means is that this triggering will trigger a lot so I will see a lot of those hellos but only when it's ongoing so if I wanted to see the hellos while I'm holding it then there will that's the way you can make it happen so just so it's a lot clearer to see it let's press play again show debug in hands input and click on the viewport we are holding it and you will see that the heavy attack has an ongoing state here ongoing and when I release it it will trigger yeah so this kind of Behavior could be very useful if you need to know how much time you were holding the key before it got triggered let's go to the next one the next one will be hold and what hold does is triggers when the whole time has been achieved where is the hold time you can expand all the events to tweak the functionality so heal the threshold is one second so I need to press one second if I change it to 2 I will need to hold my key two seconds you can decide if it triggers once if it's a one shot or if it's trigger repeatedly after you hold it so if it's not a one shot then let's press play let's show debug you will see that as soon as I'm holding it for more than two seconds or right now it's at one second I believe because I didn't save but now we are triggering a lot of the actual input if I just wanted to trigger once I'll just put it one shot save it and foreign hold it for two seconds and it says hello and you will see that the actual input action is completed so there is no more ongoing State while I'm still holding the key because right now I'm still holding the the heavy attack so whenever I release it then it ends and it gets canceled if I just release it before the ongoing state which means that we are just waiting for the two seconds we want to hold so if I release it before those two seconds they canceled event happens so we can put here triggered let's just copy and paste that canceled and completed you hold it completed trigger completed the order is very important whatever happens first will be at the bottom so that's why trigger was at the bottom and if I release it before then the canceled State happens yeah so thus far pretty simple stuff you can probably just test it and you will get the gist of it so let's continue the next one oh and before I continue here you have affected by time dilation sometimes you want uh to change the game speed to get some slow moves to get some nice effects you can do it by changing the time dilation of the game but if you don't want that dilation to affect the input you can enable or disable it so in this case right now it's not affected if I enable it then it will be affected by any type of time dilation and this threshold I believe I did explain it but just in case I will explain it again very quickly sometimes your input is just not a zero or a rule or a one sometimes usually when it's a thumbstick you can get values between 0 and 1 or -1 depending on how you have set it up so this allows to have a threshold of how much do you want your value to be in order for it to actually count as a trigger right so in case this was a actual trigger button in the controller maybe if you are pressing it lightly it will be 0.2 and this won't start the the the ongoing event or the actual trying to see if this input action will trigger or not so you will need to press it a little bit harder so you can go past this threshold right so let's continue with the hold and release which is also pretty similar whole time again let's put it two seconds let's save it and in the hold on release trigger this will trigger when you release the key after holding it the amount of time specified so let's press play let's again open the show debug and I will hold the button for two seconds and you will see that it's not triggering even though I'm holding it it won't trigger until I release the key so whenever I release it then it it's triggered and it completes perf let's continue the next one is the tap now the top here you must press and release the key in a certain window of time if you go over it then the action is canceled so here we should tap it tap the key for 0.2 seconds I'm gonna extend it to 0.5 just to get a better idea and again let's press play let's go again to the show debug and if I keep holding the key it won't be considered up and you will see that the event was canceled you can see the actual print screen in the top left corner but if I release it immediately then it is considered as a tap so completed trailer completed trigger but if I hold it then it gets canceled yeah so it's another way you can trigger your input actions that could be very very useful for combos right so let's continue let's try the pulse one the pulse triggers in an interval after being pressed it can return the completed or canceled trigger State depending on when you release the key so here pulse let's just leave this as it is let's enable the show debug and I will hold the key you will see that it's getting triggered every second if I stop holding the key you will see that it got canceled now let's tweak a little bit of the settings trigger on a start this means that as soon as you press it it will trigger and let's see if this is true I press it and yes it's trigger it's triggering so if you don't want that you want the for the player to hold it the amount of time in the interval which we can put maybe to 0.3 and I want it to for the player to hold it then you can see that it only gets triggered after the first 0.3 seconds so let's put it back to where it was if we had a trigger limit zero is no limit if we want three activation only it won't matter if you keep pressing the key let's save this I'll hold the key one two three activation and now it's completed if I stop holding the key I've before the three activations completes it means that it the whole input action was canceled so let let's put this back to zero and well let's go to the next one the next one is ah corded action trigger so let's put this as a corded action and here is where things get a little bit more complicated just a little bit so let's put this as a chord direction and you will see that here it's asking me for another recorded action now for the recorded action to work I will need to Define the another input action that will work with this one so just so I have more stuff to play with I'll create another input action and I'll call this input action light bunch just to give it any name and yeah let's leave it as it is let's save it with Ctrl s and the way decoded action work is kind of like like shortcuts so this will trigger when all the actions defined are completed this is similar to shortcut type of inputs like Ctrl Z with the difference that the order of the key presses won't matter it's very useful for the case where you want to have a horizontal hit and also an upper hit while pressing the up Arrow so what does it mean for this heavy attack to trigger and I need to add my other inproduction which is the light bunch and this light punch will be the the Z key so here let's go back to the heavy attack triggers or the action and I will put my light punch so the only way here we attack will trigger is if the light punch is also being triggered so if I just leave it like this and I save it I press play I'll put the show debug enhanced input right so you're seeing the heavy attack here and the light punch here if I press the right Mouse button nothing happens I mean you will see a message that the button is being pressed right because it says here true but this is not not even in in an ongoing state now if I press the C button the C button is being triggered because by default it works as the down type of trigger if I release it then it's completed pretty simple stuff so if I press C and then hold it and then press the heavy attack which is the right click you will see that right now both are being triggered if I stop pressing the C now none of them are being triggered but again if I'm pressing both and I lift my right click which is the heavy attack then decode deduction stop working but the hold action then it's the whole trigger excuse me is still working as it should so this can be very useful for actions where oh I'm pressing up and I should have that that actual uh let's say you have an um uh fighting game and this is the up key and this should be actually like oh look upwards or something like that I'm just calling it up key so it's super clear and let's add the mapping here up key and you have this light bunch now you could create like a corded type of trigger to identify whenever you want your light punch to tilt upwards I need what is it's just a matter of putting the coordinate action here I'm selecting here the light bunch and now when you save it right now it won't do anything right but oh let me put my debug again I press up and see and it gets triggered so I won't I wouldn't just call this up key I would put it like upwards light punch or something like that so we can actually get a useful name out of it right but yeah that's how that's how it goes now the next one it's the combo type of of trigger and let's go back to the heavy attack no chord reduction oh and you can add more than one chord of action if you need like to press three keys at the same time or or multiple kills key multiple keys at the same time now these are corded because you need to press them at the same time for them to work but in the case of the combos let me just remove the triggers here I'll tap combo and you will see that this action immediately loses its key mapping now inside the combo you can add the combo the actual actions that you need to press in order to get this combo in order to get this input action called heavy attacked for for it to work right so let's say I want to press the light punch and then the up key in a succession and here I have the time frame the time to press the key and there there can also be action that can cancel this combo for example jump in May cancel the combo who knows so we can create our own compost here let's add the light punch I have 0.5 seconds to press it and let's add the next part of the combo which would be the up key and again I will leave this like this let's save it and let's test it now when I start my combo which starts with the light Bunch which is C oh I didn't click on the viewport you will see that my combo action starts checking if it can progress the combo or if it can trigger and if it can't then it gets canceled so if I press light punch after 0.5 seconds which is the time frame that I gave the combo because I didn't press the other key then it gets canceled now if if I do press the up key I'll press C and then up or I I took too too long I see that right now it's not working now why is this because my app key needs to trigger and right now the trigger for this is a core deduction so I should really delete this so the combo one trigger if all the actions don't trigger either just take that in consideration it's especially a good lesson to learn if you are trying to make a fighting game so again show debug now if I press C and up you can see now that I have the completed and the trigger actions well States of my actual combo so I can trigger my combos that way so all action in the combo array needs to be pressed sequentially within the specified time frame so if we were adding like a type of sure you can example from from the for the street fighter series I have my app key I'll duplicate this this will be forward key now why am I calling it Forward because it really depends on it it's not always the right key or the left key it really depends on where the character is facing right so that's why I call it forward so let's add my forward mapping and again this is a very simple example simple implementation I'm not trying to get um on the specific on how to implement a sure you can type of input so for now the forward key I'll just put it to the right key and the heavy attack will be the actual trigger the sharugen so the combo for this and you can open everything if you just called shift and click this open every value inside these drop downs and you can do the same to close them yes it's pretty handy so the actual combo is forward if I can find it then up and finally a light punch in our case now let's try it if I press forward up see completed and Trigger perfect now you may want to change the timing and this is something that I I found while while I was creating this tutorial for sure 0.5 is a lot of time so if we change it to 0.2 for the combo to for for us to try to activate this combo a little bit faster or we're making our players do the key press a lot faster right we're making the combo tighter if you try to do it oh it worked actually well you you see you you will see like mixed signals like canceled completed and I'm pressing it at the same time now why is this let me open the debug when I'm pressing the app excuse me the forward right now it's the it's using the default down trigger functionality or behavior the same as the others and these may not be the the thing that you're looking for because the actual triggering the continuously triggering event and let me show you again if I'm pressing you see that the forward key is continuously triggered yeah so that can cause a problem whenever you have this time to press key number a little bit too low so in order to fix this just don't forget to put the action as a press trigger input otherwise you won't be able to trigger the combo at a fast speed so in the light bunch we just need the Pressed up key also pressed and again here pressed you can also use stop it should work also and now you really can you can see that I'm pressing I'm pressing it at the same speed and I'm getting consistent Behavior because I'm using it I'm using the depressed trigger for the actual in Productions that makes up the combo yeah I just wanted to point it to point that thing which was making me really mad because I couldn't get consistent results yeah you can try it with the press or also with the tap now that we have the basics sorted out we can go in a little bit deeper into what makes the enhanced input system so good for example changing the actual mapping context let's say that our character will pick up a power up and we'll make their their heavy attack heavier or it can grant the heavy attack right so let's say that here let's just remove our heavy attack we have deleted from our character now if we try to do a heavy attack we can't we just we can right click all we want but nothing will happen so let's say that whenever the game starts here after Maybe three seconds the character will became supercharged so let's type the character is now supercharged and maybe this is like this but what does this mean this means that I will let the player do the actual heavy attack but I don't want to miss too much with any of these other inputs so the way we can do this type of functionality is just creating a new mapping context so let's do that let's again right click input input mapping context and this will be the input mapping context for the super charged player and inside it we will create the mapping for our heavy attack which is here and again this is the right click perfect we save it and now we just need to give this new mapping context and we can do the same thing that we did before we can drag it from here I will drag it from here because otherwise you will copy and paste this and let's add a mapping context let's select our supercharged player and leave it like it is right now so for example if I press play I'm right clicking right clicking right clicking nothing happens after three seconds my character is supercharged and whenever I right click we can see that the triggers and the completed messages appear it's pretty cool right so just so we have a way of of showing that stuff's happening let's use an animation from the actual character so if we go to Paragon Aurora characters Heroes Aurora animations there will be an ability uh oh this is it ability e yeah this is the animation that will get triggered and let's right click it create an animation Montage this will be useful for us to play the animation on top of the current animations so we don't need to create another animation State we cover or well I cover the animations in we have a tutorial for that do do look for it so this case right click I will delete the e animation montage is fine let's open it and we need to make sure that our default slot is changed to the ability believe it was the default upper body let's save it let's go back to our character and let's search for our input action where is it here it is so you you've seen that it gets triggered a lot of times and I I don't want to play that that animation like 100 times if I'm just holding the key I just want to play it when this input action starts doesn't mean it has been triggered but just knowing that the key was pressed is enough for me so to play the animation I do need to get the actual skeletal mesh which is this component so let's just drag and drop it from the mesh I'll play animation and you will find this Play and play Montage note and let's connect it to a started let's select the Montage that we just created and that's pretty much it we really don't need to do anything else let's compile and if for some reason it doesn't work oh it did work perfect if it didn't work for you make sure that you are using the current the correct slot here this is because in the animation blueprint that slot allows you to to combine the animations so we go deeper into that in in our animation blueprint tutorial Okay so we have the actual montage and you will see that we are not playing the Montage until we are Uber charged overcharged home I play too much the Team Fortress 2 in my past until we are supercharged then we can play the the actual montage perfect now what would happen if in my new mapping and I will go to my old player mapping search for it with this button and open the supercharged mapping what will happen if I decide to add my jump action here and I decide to to change the input let's say I want to jump with the app key now here are two problems one I'm using the same input action and I'm using an a mapping of a key that already exists here now I'll press play and let me increase the time before getting super charged to 10 seconds why because I want to play press the up key here and see what's happening here now after 10 seconds the character will be supercharged and you will see that now we have two contexts in place now the heavy key works just as we left it but the jump if I press the space bar oh I didn't call it the same this one is that one was character Jam excuse me I need to call it character jump yeah okay let's press play again let's open our show debug enhance input and let's just wait for the for the new input mapping okay so let's press jump now you will see that there's no problem but our space bar is activating also the input action in our other mapping so and also if I press the up key is activating the input character jump in the order in the base player Mappy so what we have done with this is that essentially like going coming here and adding the same mapping like this ah and it's not in the app key it will be if the character jump okay something like this now about what's the issue the issue is that this up key and now I can just return it to two seconds so it's it's happening faster okay so after two seconds here our app key it says that it has been overridden by The Supercharged player character input so if we try to press up is listening to the new um bind that the app key has been binded to which is the character jump input action now if you want to decide which one has priority let's say oh I have this but if it's been implemented in another mapping then I should use the previous one then you can Define the priority whenever you add the mapping context priority higher priority mappings will be applied first and will block lower priority ones so I would need to here press put just put one and now the base input mapping context will be the one that have has the priority and it won't be overridden by an input mapping context with a lower priority which we can actually see now the context with more priority is up top and The Supercharged player is in the button and you will see that now that this one is the one that has been overridden and it will tell you the key well the input action where is it's been overly overridden yeah so that way you can determine which one of the mapping context you can use when which one has a priority and also you can remove mapping contexts if you search for mapping you can clear all the mappings remove map mapping context it will ask you which one of them you want to remove and it's very useful and it's very useful in this next example I will show you especially why but again this is how you can add I I was getting ahead of myself I'm sorry for that but this is how you cannot contexts input mapping context how to say it better you can add mapping contexts based on the actual game context you get a new weapon you probably will want to get new inputs maybe maybe not but you now you have the ability now let's talk about player mappable input config Maplewood configs are a collection of input mapping contexts that represent one config or configuration or preset of mappings in our case we will create an alternative map level config to attack with the right click instead of the left click and do the heavy attack with the left click instead of the right you usually will want to create whenever you have a again and you want to provide more ease of access you can create a set of of configurations for the players that are are left-handed and for the players that are right-handed and this lets you do it very easily so what do we need to do we go here input player mappable input config we'll call it label mobile input config and you could call it Lefty I'll just call it alternate so it's a way of saving the scheme different schemes of keys that you can provide to your users Okay so we can change the input of the attacks here is the player mappable config name this is just alternate metadata and the context that I want to apply whenever this mappable player mobile input context it's avid so I will need to create an input mapping context here so I can create it just like this and let's save it as input mapping context alternative scheme and inside it I just double double click that I'll add the mappings for the input for the input action attack which is now with the right Mouse button and the heavy attack which is now using the left one I just click here and again to get these values okay let's save it this one if I needed to add more context then I could and let's add it here so after Maybe two seconds just so we can see the transition I'll add from the enhanced input local player subsystem I'll add a layer add player mapable config I'll put it here the config is this one and that's pretty much it so whenever I compile let me save everything just in case I crash so let's Press Play Let's show the debug after five seconds I'll get my supercharged player and after the actual um two seconds I'll get my alternate scheme now if you see that's not working you will be actually right and maybe I forgot to do something here left Mouse button right Mouse button oh okay so let me just return the priority of this to zero and return my input this character jump oh I don't need to actually remove it yeah I can leave it like that yeah let me just leave it like that okay so I just needed to return that to zero so now the supercharge is on top and then we have the alternate scheme and you will see that the alternate scheme is being overwritten by the actual heavy attack so now if I do try to do the left I'm doing the heavy attack and the right I'm also doing the heavy attack so we have a bit of a conundrum now here we can specify the actual priority this will take so put in like 10 or 100 you can make sure that we will take in consideration this actual mapping context now let's press play and now you know why it's so important to Define priorities supercharge player and after that we are overriding the right Mouse button and the left attack now if I left click I do the heavy attack and if you if I right click I do the normal attack yeah it's pretty convenient now something you must take in consideration is that let's say that we didn't get supercharged we didn't pick up the power up but we are applying this new player mappable config that inside it you have the input mapping context that it's adding a heavy attack here what will happen here and let me just remove the delays just connect it like this and now let's try it you will see that the alternative the alternative scheme has added the attack and also the heavy attack even though we weren't supercharged and we can actually use the heavy attack and use the left the normal attack so you need to take in consideration that if you're going to add alternative you really must check if you have extra an extra context and try to handle those cases um independently from each other so that way you can make sure that you're not having actions that the player shouldn't have the last topic I want to cover is the platform settings just to cover most of the things that you can do with the enhanced input so I'm closing everything with the middle Mouse button I'm going to go to edit and I'm going to go to Project settings so platform settings if needed you can add different input settings for different platforms such as rotating the face button on the Nintendo switch or altering the actions available on mobile devices enhanced input provides a per platform mapping context redirect that allows allows you to do this very easily so I'm opening this just to have it here let's go to my content drawer I can make a blueprint and let's call it go to all classes enhanced search for enhanced input platform data select you have this new blueprint let's just call it a enhance the input platform data and usually you you will want to have the name of the actual platform you are targeting so these may be let's just call it windows let's double click it and now here in mapping context redirect you can select whenever you are using a certain time mapping context to which other context it will get redirected for example you remember that we had the alternative scheme okay we can we will need to yeah okay so the way this should work is you have your mapping context a player and you just duplicate this and this is no longer the player it will be the player but for the platform if you could be in Nintendo switch it could be really whatever and you can have as many redirects as you want as long as the keys are not are not empty so in these player windows instead of attacking with the left Mouse button I'm gonna attack with the right one instead of jumping with the space bar I'm going to jump with the enter key let's save it and now in my blueprint I'm selecting the player will actually in this platform will be redirected 2D player windows let's compile let's save it we could add another redirect we don't need it again let's save it and let me put it here so it's a little bit easier to navigate right so after having this redirect we can go to the project settings let's search for enhanced input in the categories here it is and now in platform settings we can select our platforms you will have more platforms if you make deals with either Sony Nintendo Microsoft to get the actual SDK to develop for their platform and then you will get a special version of unreal that you can build and you will have more platform settings in our case this is all we have we have the windows one default input data and let's add our class and that's how now whenever I use this platform our player mapping context will be redirected to the player Windows context now this is a Windows machine so if I press play and I press the let me just remove the these alternate mapping yeah before I forget I'll just remove it I'm leaving it as it was at the end at the start [Music] test map let's press play and you will see that my left click is not doing anything my spacebar is also not doing anything if I check my show debug enhanced input now I see that the IMC player was redirected to the player Windows redirected context and now the right click is actually the normal attack and the enter key is our jump it's pretty useful whenever you are dealing with more than one controller so if you wanted to know how can you handle whenever you have a PlayStation controller which you want to cancel stuff with the X key but the same X key position is the a button in the Nintendo switch well you can handle it like this it's pretty simple in conclusion today's lecture on the enhanced input system introduced in a real engine 5.1 officially has covered the core concept transitioning from the Legacy system examining examples exploring trigger States and implementing various input triggers we also discussed changing the mapping context creating player mappable input configs and platform specific settings by understanding and utilizing the enhanced input system you can create highly versatile and customizable input schemes for your games making them more accessible and more enjoyable for a wide range of players as you continue to develop your skills in Unreal Engine 5 take the time to refine your craft and explore the possibilities of the enhanced input system in doing so you will be well on your way to create exceptional gaming experiences for players around the world thank you
Info
Channel: UNF Games
Views: 10,880
Rating: undefined out of 5
Keywords: unfgames, unreal engine beginner tutorial, unreal engine 5 tutorial
Id: RBCLAWMWyDw
Channel Id: undefined
Length: 140min 54sec (8454 seconds)
Published: Fri Jun 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.