I'm on the earlier video in the tutorial, this video including more advanced info and code from a later project is actually quite interesting, it makes sense. Lots of complaints in comments but, it makes sense to have done it this way. It's an update to the course, I appreciate it.
no offense meant to those making those complaints, but if you cannot focus on specifically what is being addressed and soak it in. You are probably not learning much from the course and just copying.
@@DruidMechanicsGameDevelopment Oh yeah its great. I switched over to the UE5 C++ Multiplayer Shooter and I will create with your help finally my FPS stealth dream game! I have over 8 years of unity experience but I thought for that game idea I will pick a different tool (game engine). Hyped to work finally more in unreal engine.
Thank you so much for this series! I was going to add a new input to my game today and realized that this new system had been introduced. Fortunately, your series made it a really smooth transition. 😊 I like how you explain why we are doing things and repeat concepts without being excessive about it, very good tutorials.
Yes! Telling me what to do with no context doesn't help at all, it's understanding why we do things that helps me understand it! So thank you for that.
Is it easier...yes. But you really get advanced features with the mapping context when you need more than a single context. Think of games with inventory systems and other overlays where you would like to use the same keybind for different actions like "E" equipping a weapon and also "E" swapping items between an inventory and container when having a widget overlay on the screen. One context is for player actions the other context would be for the overlay.
Learned so much more wrangling this one lesson into my code than in any other single lesson. Thanks for putting me through it. Some real potential in enhanced mappings for neat interactions.
At 37:37 - To prvent spamming the call , you can choose "Pressed". Then you do not need coding anymore. Only Pressed status call funciton. Hold or Pulse does not call.
@@DruidMechanicsGameDevelopment i know i got a few of them, but i m tallikg about short videos...like 10min or some on yt and not a whole series that i have to buy for just a episode or some...maybe u can grab some attention on youtube
Thanks again for the input update crash course. Bringing my project from 4.27 - 5.1 has been a challenge. The new input system seems very promising though!
28:31 is that working for everyone? If i Check Pawn Controller Rotation. The Rotation is only on the Y Axis (up and down). and the Character rotates weirdly with it? Even though i made everything like it is in the video.
I found why. If you have both enhanced input in your CPP file as well as inputs in your project settings Input section it can take both inputs at the same time which was causing weird movements for the mouse on my side. I simply deleted the Look and Turn input from the project setting.
hey stephen, I am doing the udemy course of yours where we build an RPG in UE5 and I'm a bit confused of how jumping got implemented. From what I can see we created an input action IA_Jump which just triggers a bool when hitting space. Then we declared the UInputAction* JumpAction in our .h file, and bound the action to our input mapping and then to our character. However what I am confused about is that we never defined what the character should do when the action is triggered, yet the character jumps when triggered. I assume this is because ASlashCharacter::Jump is defined in the ACharacter class already? If so, is it possible to access these generic actions to modify them? Thanks for the answer, love your course!
Yes, Jump is a function on the ACharacter class. It is also virtual so you can override it and call ACharacter's Jump function (via Super::Jump()) in addition to adding your own custom logic.
This is really required viewing for everyone jumping into Unreal 5.1 and up for the first time. Could you put an extra slide/lecture with a link to these vids in your C++ Udemy course? I was following along and then got hit with that "depreciated" message and then got incredibly confused. These vids helped a LOT and cleared up my confusion. (Also unreal 5's progress is super chaotic. I wonder how many other things will be randomly depreciated like this.) Edit: Not necessarily THIS Udemy course (haven't reached that yet), but the beginner C++ course.
Great course! However I have issues with the "ActionState" part (around 26:00). I am following only via RUclips and I have no "ActionState" and "EActionStaet", since I can't find anything about that in the docs I guess they aren't built-in in UE, right? Are those some custom enums?
@@DruidMechanicsGameDevelopment Thank you! I guess I will buy your (surely great) courses soon! But I have other to finish, first! This was a great course on YT, by the way! 10/10!
i have a question about FRotation Matrix Axis.... In terms of axis orientation in Unreal Engine: Axis X: Forward/Backward. Axis Y: Right/Left. Axis Z: Up/Down. so thats why we use GetAxis( X ) for forward/backward? BUT in a 2D Vector Y is forward/Backward right?
Hi Stephen, I follow your course on udemy. Is there a way to still make use of your SlashCharacter while making use of the already established input mapping and enhanced input system already found in default ThirdPersonCharacter in Blueprints. That way we don't have to write unnecessary code and just make use of existing blueprint system? I tried to make a local multiplayer game but I have troubles assigning controller possession and movement
I have a question, how can I code different functionality based on the triggers on the enhanced input? For example, if I wanted to check if the player held the input vs pressing the input, how would I do that?
Hi, Stephen. In this video and the one of bird, I am able to simply forward declare both "input mapping context" and "input action", compile and assign them in the editor without including their header files. I can't seem to understand how this is possible since when we have to create subobjects or even when using the enhancedinput components, we need to include header files. Why do they need header files included but not the IMC and IA? Thank you very much.
You need to include them when using them for something that requires implementation details. This includes construction and calling functions. You can forward declare when all you need is a pointer, such as declaration in header files.
For some reason when my character jumps standing still, she doesnt really react, but if i am moving the jump animation runs corretly, has anyone else had this issue?
How to I get the velua of Trigger type Tap? The Action Value is set on Axis1D(float but when I call AddMovementInput(SideStep, Value.Get()); I get 0.f. How come, there no source that is covered?
Thank you for the tutorials. They are really helpful Also I wanted to ask, when you define the move function, why do you calculate forward and right vectors by rotation matrix? Isn't it simpler just to use GetActorForward?
i think its because this: In Unreal Engine, the choice of axis orientation is a convention used to define the coordinate system. When working with rotation matrices in Unreal Engine, the following conventions are typically followed: Axis X: Forward/Backward. Axis Y: Right/Left. Axis Z: Up/Down. If you are using FRotationMatrix::GetScaledAxis() or similar functions to retrieve an axis, you would indeed use GetScaledAxis( EAxis::X ) for the forward/backward direction. However, when dealing with 2D vectors in the context of a coordinate system, it's common for the Y-axis to represent the forward/backward direction, especially in traditional 2D graphics or mathematics. This can be a source of confusion when transitioning between 2D and 3D spaces. In Unreal Engine's 3D space, the convention is as you stated, with the X-axis representing forward/backward. When dealing with 2D vectors, especially if you're working in a 2D space within a 3D environment, you might need to consider the conventions of the specific functions or libraries you are using. In summary, when working with rotation matrices and vectors in Unreal Engine's 3D space, the X-axis is used for forward/backward. If you're working in a strictly 2D context within Unreal Engine, you may need to consider the conventions of that specific context (ChatGPT)
I have purchased your teaching courses, I would like to ask if you have considered starting a member channel on youtube? Because the videos on patreon can't be translated into Chinese, I'm from Taiwan so English is a bit difficult for me, thank you!
I usually write code ahead of the course, so I wrote this const FVector2D InputVector = Value.Get(); if (GetController()) { FVector DirectionVector = FVector(InputVector, 0.0f); AddMovementInput(DirectionVector, 1.0f); } And it totally works, including diagonal movement (with different modifiers of course). Is this an okay implementation, or are there some problems with it? Nevermind, I see the problem. These are not related to Controller rotation
Hey there @Druid Mechanics, thanks a lot for these videos, really helpful to get a grasp of the Enhanced Input System. Though i find myself in a complicated spot with what I want to achieve. I basically have a FPS character that I control thanks to Enhanced Input, (WASD mouse to look around, and E to interact). When I interact with a specific pawn I'm then possessing it. I have trouble in making my inputs behave differently wether I'm possessing my MC or my pawn, do you have any idea/documentation i could read about this kind of behaviour I'm looking for ? Cheers.
Seems like you want to enable/disable a dedicated Input Mapping Context upon the "possessed"/"unpossessed" events. You may do that from within the targeted pawn’s SetupPlayerInputComponent, BeginPlayingState or SetPawn functions (the latter is likely to be the best option for SoC).
Doesn't work for me. I know the move and look functions are running as i placed logs on there but character doesnt move at all. I get the follwoing error LogPackageName: Warning: DoesPackageExist called on PackageName that will always return false. Reason: Input '' was empty.
I am having issues with multi inputs. Holding W and S at the same time I still move backwards since the S mapping has priority. I had to break every direction into it's own InputAction and Move_Direction() class in my CPP file. Is there a way to fix this so I can still keep a single class for movement like you did but not allow multi input overlapping like this?
Hi , Do you have any idea over taking input as text from user and converting that to humanoid action Ex: "1" as input it has to show sign language indication by character
help-me pleeaassee I want it to move in the direction of the camera when I press certain keys, but the movement isn't synchronized as I expected. Details: I'm using the default Unreal Animation Blueprint (AnimBP). The Character Movement Component is configured as per the default. The Spring Arm is set up correctly. Has anyone experienced something similar? Any suggestions on how to resolve this?
Hi, Somehow adding a virtual void Jump() override on header file caused some errors but after removing this line. The jump function work. Is there a explaination on that ? My header file inherit from the ACharacter class
@@izmirrexhepi9922 that's because Jump works when you call it. But if you override it with an empty function, now calling Jump gives you - well, the execution of an empty function.
I really love your courses and I have some of your Unreal C++ courses. I'm now intersting in Gameplay Ability System, would you make some tutorials or courses about it ?
Running into an issue with Look, it's changing the direction my character moves, but it's not rotating my camera/mesh, so my model is staying in the same direction it started in, but moving in the direction the camera/model should be looking. IA_Look is set to Axis2d and the IMC is set to be Mouse XY 2D-Axis, so confused on what's going on.
When you assign a key in input mapping context, at default all of them will be in +X axis. After assigning WASD keys, in the editor type "showdebug enhancedinput" in the console. Then when you click on the WASD keys, you will see all of them are giving +X values. So then when you swizzle a key, they will instead be giving +Y value. This way you can swizzle W and S, so you can seperate them to Y axis and identify which is which for forwards and side movement. Usually Y axis for forwards and backwards, X axis for sideways.
Getting an error when trying to check ActionState for New Enhanced Input System, should we have to include anything in header file as you have not mentioned in this tutorial
@@DruidMechanicsGameDevelopment I cant access the discord server through links in udemy courses or through google. On my side the server doesnt exist. I'd appreciate a direct invite.
If we were going to implement a walk function, how would we access move to find out if it is moving? I've created a new input action for walk but i'm not sure if I should adjust the value of move or create max speeds?
@@DruidMechanicsGameDevelopment Sorry, I guess I should have explained that I created an Enhanced Input for Walk. I have the Move input but I’m not quite sure on how to make them work together so that when I release the Walk button it reverts to the Move speed. I managed to rig it together by declaring WalkSpeed and JogSpeed(Move) in the header and adding an if statement in each input that reverts to the declared speeds but it doesn’t seem like the right way. Thanks for the response!
@Hastycakes Ah I see. If it works, I think it's fine. You can structure it so it's better coded using other design patterns but for your use case I think it's okay. Associating each input action with a gameplay tag could allow you to have different walk speeds based on the tag.
@@DruidMechanicsGameDevelopment Thanks! I'll give gameplay tags a try. All i have to do now is fix my project somehow lol after trying to add a sprint I think it broke the Character Movement Component because it no longer shows any details when clicked.
AddMovementInput() will be called twice always, and AddControllerYawInput() AddControllerPitchInput() always called together? And the only reason why only one works is because the other is 0? If yes, isn´t that "bad"?
They are called together, and just because one is non-zero doesn't mean the other will be zero. You must handle both at the same time unless you want mutually exclusive movement (do you really want to be prevented from moving sideways because you're moving forward and vice versa?) The old way called two separate functions with AddMovementInput. Why would it be bad? Two function calls versus one is a negligible change and when profiling you will never see the slightest performance difference.
Thanks so much for this. I am a Patreon of yours and also have all your Udemy courses. My character is not moving. It's the AddMovementInput that doesn't impact my character. The binding of the functions seems to work. I am able to log out the correct values for the movement but there's still no movement on the character. I wanted to build a character form scratch so I chose a blank project tenplate rather than the third person template. Would you know if there's anything on the character that could be wrong? I have since created another third person template project and copy pasted the constructor code into my characters constructor.
Did you skip adding the movement component to the Pawn? We add it in the Udemy lectures you may have skipped to watch this. I recommended not skipping them.
@@DruidMechanicsGameDevelopment I wasn't following the course actually at this time. I was having my own project, just trying to learn the Enhanced Input for C++. I used a basec character class that was intended for all NPC:s and then an child class for the player character. I created a new child class and it worked flawlessly. Thank you very much for taking your time to answer.
E Button isn't working, it generates overlap with weapon and enhancedinput debug log shows it is being activated. I've checked code for hours with no way to fix this.
Hi I'm interested in purchasing your Unreal 5 course on Udemy. However, I seem to have some processor problems. My current laptop is listed @ 1.30GHz. Does that mean that I'm completely excluded from being able to follow your course?
Why do you keep saying you can't forward declare a your FInputActionValue which is taken in as a reference? You can forward declare it just as any other pointer by simply saying "struct FInputActionValue;" with the rest of your forward declarations.
Hey, I'm intrested in buying one of your courses. I didn't really know where else to ask, but do any of your courses cover GAS? If they don't can you explain how long it might take going from the way you taught your course to building a game using GAS?
@@DruidMechanicsGameDevelopment Sorry, last question (really apprecaite you taking the time). Can you give me an idea of what one would need to learn first so I can prepare during the month, and if you have a course or no of one that would be good for prepping for it?
Please I need your help. If you helps me! I will supported you and I will so grateful... You can make a tutorial about a character from the ground picking up some weapons and using them. Different weapons sword, pistol and axe. And each weapon will have its own animation without the inventory system, but each weapon will be activated with buttons. For example the Q button of the gun and the R button of the ax and the T button of the Hammer to attack. Like in Bloodborne, dmc and dark souls
Hey Stephen. Thank you a lot! I love your content and I reallyI appreciate it. Can you help me with this error? I'm getting this error: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 10] Cast of InputComponent /Game/Maps/UEDPIE_0_Main.Main:PersistentLevel.BP_TankPawnMovementComp_C_0.PawnInputComponent0 to EnhancedInputComponent failed . I'm trying to use the enhanced movement component with a tank pawn. I did everything that you did in this video, adjusting the code to my tank. I'm guessing that the enhaced input component cannot be casted to the pawn input type, just to character input? Isn't it?
Not sure if you figured this out yet, but I was also having the same issue and then remembered, for a pawn to take movement you need to add the Floating Pawn Movement component, I did this in the blueprint to save my self some time, not sure how/if it can or should be added via the C++ code.
@@lucasargentina5586 thx for the reply ^^ I was concerned because UE5 was using 100%of my gpu all the time on a simple 3D game template, but it turned out that the fps was not capped.
Hi, i'm student of your Ultimate Shooter Course, i have some question about Unreal Engine about JSON data, can you support for me!? I can pay for your support!
I was doing fine up until the course said to watch this video. You introduced things that were way ahead of what we do after this, and since the context of the "next" video doesn't take into account the context of "this" video, it caused me to pretty much scrap my movement script that I already had. Going to have to go back to the other Enhanced Input videos now. Nice.
Hey there, I'm sorry you felt it was jarring. Enhanced Input was added to the course after the course was released. It might be easier just to follow the course without Enhanced Input and then come back to it, as this video is about converting from the old way. The Udemy course says to watch the videos doing it the old way first, then watch the corresponding YT video.
My advice following the course it to finish until video 79 and then watch this video, because yes you might get confused with the mover right and turn functions, hopefully it helps.
Supremely disappointed in how rushed and cluttered this section is. For a beginners module you blast through most of this lesson, with a fully fleshed out character that we are supposed to be building, you blow past needed stuff in C++ and show off functions that the students game doesn't even has set up already. I understand you aren't going to get paid to properly update the course, but man.. really dropped the ball here.
I'm on the earlier video in the tutorial, this video including more advanced info and code from a later project is actually quite interesting, it makes sense. Lots of complaints in comments but, it makes sense to have done it this way. It's an update to the course, I appreciate it.
no offense meant to those making those complaints, but if you cannot focus on specifically what is being addressed and soak it in. You are probably not learning much from the course and just copying.
You can forward declare a non pointer by using the struct keyword. 14:40
The little RUclips course on input was just the right promotion for your Udemy course. I bought it because of that!
Welcome to the course! I hope you love it :)
@@DruidMechanicsGameDevelopment Oh yeah its great. I switched over to the UE5 C++ Multiplayer Shooter and I will create with your help finally my FPS stealth dream game! I have over 8 years of unity experience but I thought for that game idea I will pick a different tool (game engine). Hyped to work finally more in unreal engine.
Thank you so much for this series! I was going to add a new input to my game today and realized that this new system had been introduced. Fortunately, your series made it a really smooth transition. 😊 I like how you explain why we are doing things and repeat concepts without being excessive about it, very good tutorials.
Yes! Telling me what to do with no context doesn't help at all, it's understanding why we do things that helps me understand it! So thank you for that.
Im so glad you made a tutorial on this. But am I the only one that feels like the original way of movement input was easier lol
Is it easier...yes. But you really get advanced features with the mapping context when you need more than a single context. Think of games with inventory systems and other overlays where you would like to use the same keybind for different actions like "E" equipping a weapon and also "E" swapping items between an inventory and container when having a widget overlay on the screen. One context is for player actions the other context would be for the overlay.
Learned so much more wrangling this one lesson into my code than in any other single lesson. Thanks for putting me through it. Some real potential in enhanced mappings for neat interactions.
At 37:37 - To prvent spamming the call , you can choose "Pressed". Then you do not need coding anymore. Only Pressed status call funciton. Hold or Pulse does not call.
That is definitely true
i would wish that u make more youtube turorials in ue5 c++ cuz everyone is doing in bp
I do have courses on Udemy!
@@DruidMechanicsGameDevelopment i know i got a few of them, but i m tallikg about short videos...like 10min or some on yt and not a whole series that i have to buy for just a episode or some...maybe u can grab some attention on youtube
@@DruidMechanicsGameDevelopment and they're very good ones! I got a few and learned a lot. Keep it up!
Tremendous series! purchased the course straight off, starting tonight, hoping the quality is as good as this.
Thanks again for the input update crash course. Bringing my project from 4.27 - 5.1 has been a challenge. The new input system seems very promising though!
28:31 is that working for everyone?
If i Check Pawn Controller Rotation. The Rotation is only on the Y Axis (up and down). and the Character rotates weirdly with it? Even though i made everything like it is in the video.
I got the same issus have resolve it yet??
@@geepy1671 Same here, any updates?
I found why. If you have both enhanced input in your CPP file as well as inputs in your project settings Input section it can take both inputs at the same time which was causing weird movements for the mouse on my side. I simply deleted the Look and Turn input from the project setting.
I have a problem. I miss the function jump at 30:30. Where did you start to code it?
Jump is inherited from ACharacter
Big thanks for all of your effort in putting this content together. I really appreciate it!
Just bought two of your courses not realizing I also watch your RUclips lol
Thank you for this series. It was very helpful and comprehensive.
Love your tutorials and your Udemy courses, they've helped me so much. Thank you
if you could chop these up into sections so that when im bouncing back and forth to this video, im not as lost, thatd be sweet
In min 35:23 I tried to copy the if condition with "IsUnoccupied" argument although my code says is undefined, any help with that please?
hey stephen, I am doing the udemy course of yours where we build an RPG in UE5 and I'm a bit confused of how jumping got implemented.
From what I can see we created an input action IA_Jump which just triggers a bool when hitting space. Then we declared the UInputAction* JumpAction in our .h file, and bound the action to our input mapping and then to our character. However what I am confused about is that we never defined what the character should do when the action is triggered, yet the character jumps when triggered.
I assume this is because ASlashCharacter::Jump is defined in the ACharacter class already? If so, is it possible to access these generic actions to modify them?
Thanks for the answer, love your course!
Yes, Jump is a function on the ACharacter class. It is also virtual so you can override it and call ACharacter's Jump function (via Super::Jump()) in addition to adding your own custom logic.
This is really required viewing for everyone jumping into Unreal 5.1 and up for the first time.
Could you put an extra slide/lecture with a link to these vids in your C++ Udemy course? I was following along and then got hit with that "depreciated" message and then got incredibly confused.
These vids helped a LOT and cleared up my confusion. (Also unreal 5's progress is super chaotic. I wonder how many other things will be randomly depreciated like this.)
Edit: Not necessarily THIS Udemy course (haven't reached that yet), but the beginner C++ course.
Great course! However I have issues with the "ActionState" part (around 26:00).
I am following only via RUclips and I have no "ActionState" and "EActionStaet", since I can't find anything about that in the docs I guess they aren't built-in in UE, right? Are those some custom enums?
They are custom from my course
@@DruidMechanicsGameDevelopment Thank you! I guess I will buy your (surely great) courses soon! But I have other to finish, first!
This was a great course on YT, by the way! 10/10!
Question: If X is forward/backwards in the Editor why is Left and Right -X/+X in the Input mappings? /shouldn't Y be left and right?
No, on a 2D axis X is left and right and Y is up and down.
This series was amazing thank you very much. You explained this system awesome and very easy
4:21 "Deleting saved, intermediate and binaries" What is that, why do we delete them?
Forces the project to rebuild them with all the new dependencies you included in the build file
i have a question about FRotation Matrix Axis....
In terms of axis orientation in Unreal Engine:
Axis X: Forward/Backward.
Axis Y: Right/Left.
Axis Z: Up/Down.
so thats why we use GetAxis( X ) for forward/backward? BUT in a 2D Vector Y is forward/Backward right?
Hi Stephen, I follow your course on udemy. Is there a way to still make use of your SlashCharacter while making use of the already established input mapping and enhanced input system already found in default ThirdPersonCharacter in Blueprints. That way we don't have to write unnecessary code and just make use of existing blueprint system? I tried to make a local multiplayer game but I have troubles assigning controller possession and movement
nice video, you can forward declare references btw.
Thanks! Yes, I misspoke about that. You totally can.
Thank u so much!! This was a lot help for me!
I have a question, how can I code different functionality based on the triggers on the enhanced input? For example, if I wanted to check if the player held the input vs pressing the input, how would I do that?
why seems like the idle animation isn't looped
Hi, Stephen. In this video and the one of bird, I am able to simply forward declare both "input mapping context" and "input action", compile and assign them in the editor without including their header files. I can't seem to understand how this is possible since when we have to create subobjects or even when using the enhancedinput components, we need to include header files. Why do they need header files included but not the IMC and IA? Thank you very much.
You need to include them when using them for something that requires implementation details. This includes construction and calling functions. You can forward declare when all you need is a pointer, such as declaration in header files.
For some reason when my character jumps standing still, she doesnt really react, but if i am moving the jump animation runs corretly, has anyone else had this issue?
How to I get the velua of Trigger type Tap? The Action Value is set on Axis1D(float but when I call AddMovementInput(SideStep, Value.Get()); I get 0.f. How come, there no source that is covered?
Thank you for the tutorials. They are really helpful
Also I wanted to ask, when you define the move function, why do you calculate forward and right vectors by rotation matrix? Isn't it simpler just to use GetActorForward?
i think its because this:
In Unreal Engine, the choice of axis orientation is a convention used to define the coordinate system. When working with rotation matrices in Unreal Engine, the following conventions are typically followed:
Axis X: Forward/Backward.
Axis Y: Right/Left.
Axis Z: Up/Down.
If you are using FRotationMatrix::GetScaledAxis() or similar functions to retrieve an axis, you would indeed use GetScaledAxis( EAxis::X ) for the forward/backward direction.
However, when dealing with 2D vectors in the context of a coordinate system, it's common for the Y-axis to represent the forward/backward direction, especially in traditional 2D graphics or mathematics. This can be a source of confusion when transitioning between 2D and 3D spaces.
In Unreal Engine's 3D space, the convention is as you stated, with the X-axis representing forward/backward. When dealing with 2D vectors, especially if you're working in a 2D space within a 3D environment, you might need to consider the conventions of the specific functions or libraries you are using.
In summary, when working with rotation matrices and vectors in Unreal Engine's 3D space, the X-axis is used for forward/backward. If you're working in a strictly 2D context within Unreal Engine, you may need to consider the conventions of that specific context
(ChatGPT)
Is your unreal ultimate handbook or the udemy unreal course more for c++?
I have purchased your teaching courses, I would like to ask if you have considered starting a member channel on youtube? Because the videos on patreon can't be translated into Chinese, I'm from Taiwan so English is a bit difficult for me, thank you!
I usually write code ahead of the course, so I wrote this
const FVector2D InputVector = Value.Get();
if (GetController())
{
FVector DirectionVector = FVector(InputVector, 0.0f);
AddMovementInput(DirectionVector, 1.0f);
}
And it totally works, including diagonal movement (with different modifiers of course). Is this an okay implementation, or are there some problems with it?
Nevermind, I see the problem. These are not related to Controller rotation
Hey there @Druid Mechanics, thanks a lot for these videos, really helpful to get a grasp of the Enhanced Input System. Though i find myself in a complicated spot with what I want to achieve. I basically have a FPS character that I control thanks to Enhanced Input, (WASD mouse to look around, and E to interact). When I interact with a specific pawn I'm then possessing it. I have trouble in making my inputs behave differently wether I'm possessing my MC or my pawn, do you have any idea/documentation i could read about this kind of behaviour I'm looking for ?
Cheers.
Seems like you want to enable/disable a dedicated Input Mapping Context upon the "possessed"/"unpossessed" events. You may do that from within the targeted pawn’s SetupPlayerInputComponent, BeginPlayingState or SetPawn functions (the latter is likely to be the best option for SoC).
is your course also on gamedev?
Doesn't work for me. I know the move and look functions are running as i placed logs on there but character doesnt move at all. I get the follwoing error
LogPackageName: Warning: DoesPackageExist called on PackageName that will always return false. Reason: Input '' was empty.
Just curious if your Unreal Engine 5 C++ Multiplayer Shooter includes enhanced input for the player movements?
I still don’t have Any Z axis when I do the animation after following the last steps, is there anything that could be stopping that?
I am having issues with multi inputs. Holding W and S at the same time I still move backwards since the S mapping has priority. I had to break every direction into it's own InputAction and Move_Direction() class in my CPP file. Is there a way to fix this so I can still keep a single class for movement like you did but not allow multi input overlapping like this?
How would we handle multiple players?
Hi , Do you have any idea over taking input as text from user and converting that to humanoid action
Ex: "1" as input it has to show sign language indication by character
Thank you...working like a charm...
help-me pleeaassee
I want it to move in the direction of the camera when I press certain keys, but the movement isn't synchronized as I expected.
Details:
I'm using the default Unreal Animation Blueprint (AnimBP).
The Character Movement Component is configured as per the default.
The Spring Arm is set up correctly.
Has anyone experienced something similar? Any suggestions on how to resolve this?
how do you manage that the mesh rotatates ? is it an animation ?
do you know how would i get the input action value in c++?
Hi, Somehow adding a virtual void Jump() override on header file caused some errors but after removing this line. The jump function work. Is there a explaination on that ? My header file inherit from the ACharacter class
If you override jump but don't call Super::Jump, your character will not jump.
@@DruidMechanicsGameDevelopment oh I see, i'll give it a try
@@DruidMechanicsGameDevelopment
It works when I don't override it, what could be the cause ?
@@izmirrexhepi9922 that's because Jump works when you call it. But if you override it with an empty function, now calling Jump gives you - well, the execution of an empty function.
@@DruidMechanicsGameDevelopment i see but why didn't it override your jump function
I really love your courses and I have some of your Unreal C++ courses. I'm now intersting in Gameplay Ability System, would you make some tutorials or courses about it ?
I am working on a new GAS course, and streaming the creation of assets for it on Twitch! @DruidMechanics
@@DruidMechanicsGameDevelopment Great. I'm looking forward to your new course.
Running into an issue with Look, it's changing the direction my character moves, but it's not rotating my camera/mesh, so my model is staying in the same direction it started in, but moving in the direction the camera/model should be looking. IA_Look is set to Axis2d and the IMC is set to be Mouse XY 2D-Axis, so confused on what's going on.
To anyone who sees this, I figured out the issue, I had to select Use Controller Rotation Yaw on my Pawn
can you explain this further?@@Grant6243
Love the Udemy Course. Do you have anything for Top-Down and Auto-pathing?
Yes, my latest course covers it. It's my new course on GAS - available as Early Access on my patreon.
I don't understand why are we using Swizzle Input Axis Value ? I 'm little confused . Does anybody explain to me guys? Thank you so much :)
I recommend watching that part again, it's explained in the video
When you assign a key in input mapping context, at default all of them will be in +X axis. After assigning WASD keys, in the editor type "showdebug enhancedinput" in the console. Then when you click on the WASD keys, you will see all of them are giving +X values. So then when you swizzle a key, they will instead be giving +Y value. This way you can swizzle W and S, so you can seperate them to Y axis and identify which is which for forwards and side movement. Usually Y axis for forwards and backwards, X axis for sideways.
@@muhsinhameed5446 Thank you so muchh for explain to me I understand now bro 😀🤘🤘
Getting an error when trying to check ActionState for New Enhanced Input System, should we have to include anything in header file as you have not mentioned in this tutorial
I would watch again carefully and make sure you didn't miss anything
Is the druid mechanics discord shut down? I'd like to get some help with one of the courses by Stephen.
No, it is working. You could have been quarantined by my bot, can you send me a DM
@@DruidMechanicsGameDevelopment I cant access the discord server through links in udemy courses or through google. On my side the server doesnt exist. I'd appreciate a direct invite.
@@hhhhhhyy what's your discord name?
@@DruidMechanicsGameDevelopment Starrukin, same as here
@@hhhhhhyy there should be some numbers at the end of it
If we were going to implement a walk function, how would we access move to find out if it is moving? I've created a new input action for walk but i'm not sure if I should adjust the value of move or create max speeds?
AddMovementInput doesn't let you adjust walk speeds so that would involve setting MaxWalkSpeed on the Character Movement Component.
@@DruidMechanicsGameDevelopment Sorry, I guess I should have explained that I created an Enhanced Input for Walk. I have the Move input but I’m not quite sure on how to make them work together so that when I release the Walk button it reverts to the Move speed. I managed to rig it together by declaring WalkSpeed and JogSpeed(Move) in the header and adding an if statement in each input that reverts to the declared speeds but it doesn’t seem like the right way. Thanks for the response!
@Hastycakes Ah I see. If it works, I think it's fine. You can structure it so it's better coded using other design patterns but for your use case I think it's okay.
Associating each input action with a gameplay tag could allow you to have different walk speeds based on the tag.
@@DruidMechanicsGameDevelopment Thanks! I'll give gameplay tags a try. All i have to do now is fix my project somehow lol after trying to add a sprint I think it broke the Character Movement Component because it no longer shows any details when clicked.
AddMovementInput() will be called twice always, and AddControllerYawInput() AddControllerPitchInput() always called together? And the only reason why only one works is because the other is 0? If yes, isn´t that "bad"?
They are called together, and just because one is non-zero doesn't mean the other will be zero. You must handle both at the same time unless you want mutually exclusive movement (do you really want to be prevented from moving sideways because you're moving forward and vice versa?)
The old way called two separate functions with AddMovementInput.
Why would it be bad? Two function calls versus one is a negligible change and when profiling you will never see the slightest performance difference.
@@DruidMechanicsGameDevelopment Got it! Thank you!
Thanks so much for this. I am a Patreon of yours and also have all your Udemy courses.
My character is not moving. It's the AddMovementInput that doesn't impact my character. The binding of the functions seems to work. I am able to log out the correct values for the movement but there's still no movement on the character. I wanted to build a character form scratch so I chose a blank project tenplate rather than the third person template.
Would you know if there's anything on the character that could be wrong? I have since created another third person template project and copy pasted the constructor code into my characters constructor.
Did you skip adding the movement component to the Pawn?
We add it in the Udemy lectures you may have skipped to watch this. I recommended not skipping them.
@@DruidMechanicsGameDevelopment I wasn't following the course actually at this time. I was having my own project, just trying to learn the Enhanced Input for C++. I used a basec character class that was intended for all NPC:s and then an child class for the player character. I created a new child class and it worked flawlessly.
Thank you very much for taking your time to answer.
E Button isn't working, it generates overlap with weapon and enhancedinput debug log shows it is being activated. I've checked code for hours with no way to fix this.
I solved it, my Weapon Blueprint wasn't deriving from Weapon class but from Item, I deleted it and made a new one derived from Weapon
Hi I'm interested in purchasing your Unreal 5 course on Udemy. However, I seem to have some processor problems. My current laptop is listed @ 1.30GHz. Does that mean that I'm completely excluded from being able to follow your course?
No, You are completely excluded from learning Unreal Engine itself.
Why do you keep saying you can't forward declare a your FInputActionValue which is taken in as a reference?
You can forward declare it just as any other pointer by simply saying "struct FInputActionValue;" with the rest of your forward declarations.
Hey, I'm intrested in buying one of your courses. I didn't really know where else to ask, but do any of your courses cover GAS? If they don't can you explain how long it might take going from the way you taught your course to building a game using GAS?
I am releasing a course on GAS in about a month. I'm almost done with it!
@@DruidMechanicsGameDevelopment I can't wait! Will it be beginner friendly?
@@ceejay1353 no, it is not a beginner course. You will need to know the basics already as GAS is a more intermediate topic.
@@DruidMechanicsGameDevelopment Sorry, last question (really apprecaite you taking the time). Can you give me an idea of what one would need to learn first so I can prepare during the month, and if you have a course or no of one that would be good for prepping for it?
@@ceejay1353 Yes! You can take my course, Unreal Engine 5 C++ The Ultimate Game Developer Course. It will prepare you for the GAS course!
Hi, Stephen, thanks for this, but I can't get to Looking Actions to work. I move my mouse and nothing happens.
Regards,
Nick
Just redone from scratch and working fine.
Nick.
@@nickprice6644 same for me. Did you find out what the problem was?
@@ovrava No sorry I didn't. I went back to my previous Source Safe commit and redid this session.
Nick
also you should select Input Action file in BP_Character. (Details->Input Section)
Please I need your help. If you helps me! I will supported you and I will so grateful... You can make a tutorial about a character from the ground picking up some weapons and using them. Different weapons sword, pistol and axe. And each weapon will have its own animation without the inventory system, but each weapon will be activated with buttons. For example the Q button of the gun and the R button of the ax and the T button of the Hammer to attack. Like in Bloodborne, dmc and dark souls
Hey Stephen. Thank you a lot! I love your content and I reallyI appreciate it. Can you help me with this error? I'm getting this error: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 10] Cast of InputComponent /Game/Maps/UEDPIE_0_Main.Main:PersistentLevel.BP_TankPawnMovementComp_C_0.PawnInputComponent0 to EnhancedInputComponent failed . I'm trying to use the enhanced movement component with a tank pawn. I did everything that you did in this video, adjusting the code to my tank. I'm guessing that the enhaced input component cannot be casted to the pawn input type, just to character input? Isn't it?
Not sure if you figured this out yet, but I was also having the same issue and then remembered, for a pawn to take movement you need to add the Floating Pawn Movement component, I did this in the blueprint to save my self some time, not sure how/if it can or should be added via the C++ code.
Can a 3050 8gb, i312100, and a 16gb ram handle this?
Yes!! That's a good pc enough to run UE5 at decent performance level
@@lucasargentina5586 thx for the reply ^^ I was concerned because UE5 was using 100%of my gpu all the time on a simple 3D game template, but it turned out that the fps was not capped.
@@Armada0500 Exactly! You are able to edit that in editor config and obviously you can cap the fps of your game
You can always set the Engine Scalability settings to low or medium. If you Pc has Problems
top right - settings - engine scalability
Hi, i'm student of your Ultimate Shooter Course, i have some question about Unreal Engine about JSON data, can you support for me!? I can pay for your support!
I was doing fine up until the course said to watch this video. You introduced things that were way ahead of what we do after this, and since the context of the "next" video doesn't take into account the context of "this" video, it caused me to pretty much scrap my movement script that I already had. Going to have to go back to the other Enhanced Input videos now. Nice.
Hey there, I'm sorry you felt it was jarring. Enhanced Input was added to the course after the course was released. It might be easier just to follow the course without Enhanced Input and then come back to it, as this video is about converting from the old way.
The Udemy course says to watch the videos doing it the old way first, then watch the corresponding YT video.
My advice following the course it to finish until video 79 and then watch this video, because yes you might get confused with the mover right and turn functions, hopefully it helps.
Supremely disappointed in how rushed and cluttered this section is. For a beginners module you blast through most of this lesson, with a fully fleshed out character that we are supposed to be building, you blow past needed stuff in C++ and show off functions that the students game doesn't even has set up already. I understand you aren't going to get paid to properly update the course, but man.. really dropped the ball here.
Did this channel die?
I'm currently working on my next course.