C++ Character Input Implementation UE4 / Unreal Engine 4 C++

Sdílet
Vložit
  • čas přidán 11. 09. 2024
  • UE4 C++:
    This playlist covers various aspects of working with C++ inside of the Unreal Engine.
    This Video:
    In this video, we implement our player movement bindings and set up the main components. This is part 1/2 of the player code class implementation.
    Links:
    The beginning of this playlist: bit.ly/CPPOverv...
    Download projects from any complete tutorial series and more: github.com/Dev...
    Consider supporting the channel on Patreon: / devenabled
    My First Pluralsight Course: app.pluralsigh...
    My Second Pluralsight Course: www.pluralsigh...
    My Third Pluralsight Course: app.pluralsigh...
    Check out my Website: devenabled.com/
    Twitter: / robbcreates
    Sound Effects (BFXR): www.bfxr.net/
    Get Affinity Designer: affinity.serif...
    Get Unreal: www.unrealengi...
    Get Some great free assets here: www.gamedevmar... Gamedev.tv Courses - Affiliate Links:
    Unreal C++ Developer: www.gamedev.tv...
    Unreal Multiplayer: www.gamedev.tv...
    Unreal Blueprints: www.gamedev.tv...
    Blender Characters: www.gamedev.tv...

Komentáře • 49

  • @DevEnabled
    @DevEnabled  Před 5 lety +4

    In this video, we implement our player movement bindings and set up the main components. This is part 1/2 of the player code class implementation.

  • @orlandoalmario
    @orlandoalmario Před 5 lety +14

    there is so much little content on using C++ inside unreal, thank you very much for sharing this content, trully awesome stuff!

  • @subcanisdev7225
    @subcanisdev7225 Před 4 lety +5

    Hands down the best tutorial I have seen with C++ and Unreal. The beginner videos just teach how to do stuff in blueprint. The advanced videos are too fast and are easy to get lost. Thank you for making videos that go into C++ basics and teaching new coders how to make a game from scratch on Unreal that isn't just blueprint.

    • @DevEnabled
      @DevEnabled  Před 4 lety +4

      Great to hear people finding it useful. I know I really try to drive that point hard but I still so many people fighting for EITHER BP or C++ and it's just slowing down a lot of workflows.

  • @JonesCrimson
    @JonesCrimson Před 4 lety +2

    I actually got pretty far doing this on my own, but there was a part of the documentation that confused me so I came here and that helped.

  • @afakkobyab5982
    @afakkobyab5982 Před 5 lety +1

    thanks, great that you continute C++ with UE

  • @novaria
    @novaria Před 4 lety

    Really no problem with the length of the videos in this series... The content is great! Also, if it were too much to digest at once I as a viewer always have the option of pausing the video :)

  • @MatthewCC0311
    @MatthewCC0311 Před 4 lety

    Hey Rob great content as usual. You may remember me from a few months ago, maybe not. Either way I am back again after divorcing UE4 to pursue DirectX API Game engine programming. I have now decided against that and am back to just using UE4 for my game haha. I will perhaps go back to those things after I finish some games! I will continue to follow your series and I am glad to see that you are still going strong! I after I get through your YT videos I will look into your patreon and join your Discord! I am not stopping UE4 until I master it, and only then can I start looking for my own solutions to game creation. Looking forward to see more from you! Thanks for it all :)

    • @DevEnabled
      @DevEnabled  Před 4 lety

      Hey, yeah of course. Great to hear you came back to the Unreal ways, definitely the way to go if you just want to get a game up and running. I look forward to seeing you over on Discord. It's not too busy there yet but the community is definitely growing.

  • @XiOh
    @XiOh Před 5 lety

    thx for the vid and explaining where to find what to include

  • @nfrancisj2122
    @nfrancisj2122 Před 5 lety +2

    Is there a reason you're doing it from scratch? (Other than for tutorial purposes) All these components are already available for use in the blueprints. A more efficient way, in my opinion, is to create a blueprint, add whatever components you need, then add functionality/behavior via C++ code. You can source a blueprint and its components via C++. (If you don't want to use the node base graph for performance concerns)
    Thanks for taking the time to share. 🙂. I enjoy watching your series.

    • @DevEnabled
      @DevEnabled  Před 5 lety +1

      Thanks, glad you hear you're enjoying them. I think I go into this in a lot more detail in the first video of this playlist. But in short, I'm trying to cover as much C++ as possible whilst balancing efficiency. Things like this are much easier in BP but people starting developing in c++ are likely to see this kind of code around in existing projects or examples so I figured it's useful to know the implementation.

    • @nfrancisj2122
      @nfrancisj2122 Před 5 lety

      Dev Enabled Gotcha! 👍

    • @mistakenmeme
      @mistakenmeme Před 5 lety +2

      Because it's fun

  • @VampNeo
    @VampNeo Před 3 lety

    Excellent tutorial. Though I have a request , if it's possible for you please make a tutorial on touch interface , how to make use of default one and modify one in c++. Most of the instructors doesn't give any importance to touch interface , however nowadays mobiles are taking over, but there are very less info on that or just the basic ones . No one goes in deep for a topic like how to make your own virtual joystick in c++ for ue4 . There are tons of students searching for touch based tutorials on internet and everyone has to get sad as there are none profound tutorial.

    • @DevEnabled
      @DevEnabled  Před 3 lety +1

      Hey, thanks. Just so you're not waiting around, that's probably not going to happen. I'm happy for mobile and its success but in general, I don't work with them and actively avoid projects involving mobile devices due to the general irritations when working with the platform. On top of that, Unreal really isn't built with mobile development in mind. If I absolutely had to build something for mobile, I'd move over to Unity without a second thought. That's not to say you can't make mobile apps in Unreal, but it does add extra levels of frustration to working with an already frustrating dev structure.

  • @TheBugB
    @TheBugB Před 5 lety +1

    How much C++ do you think you should learn before trying to jump into developing?? I only have a very basic understanding of a small amount of C++ content. Also a little off topic, but do you strictly generally stay to the coding aspect of game development or do you also dabble in things like character art, animations, and level design.

    • @DevEnabled
      @DevEnabled  Před 5 lety +3

      Not sure how to answer that one really. I prefer to learn things by implementation so I'd say just learn it whilst you go. You'll never know or remember 100% of a language so you can just pick up what you need as you go along. Of course that's if you even need C++ for your project. There's no reason not to just jump in and start working with Blueprints, I do most of my full-time work in BP unless I have as specific requirement for some C++ like writing a plugin or extension. I like to do a little bit of everything when I get the chance. My main job is as a programmer and I know I'd get really bored and burned out if I only ever wrote code. When I had more spare time I enjoyed doing Game Jams like Ludum Dare and working solo so I had to do art, sound, programming etc.

    • @TheBugB
      @TheBugB Před 5 lety +1

      @@DevEnabled Do you think you would ever do any tutorials on things that are art and sound related??

    • @DevEnabled
      @DevEnabled  Před 5 lety +3

      @@TheBugB I'm getting better with Blender and feeling a bit more confident that I'm taking the correct approach for good modelling standards. As soon as I'm sure I won't be teaching any bad practices or anything I'll likely start covering some of that. As for sound I have no idea what I'm doing with that but it's always fun to try.

    • @TheBugB
      @TheBugB Před 5 lety +1

      @@DevEnabled Thats fair I'm excited for when you feel more comfortable with blender and those may start releasing.

  • @alexandroiceman6707
    @alexandroiceman6707 Před 5 lety

    Good tutorial

  • @cloudirs5
    @cloudirs5 Před 3 lety

    I am getting an error on "LookUpAtRate" with this line:
    PlayerInputComponent->BindAxis("LookUpRate", this, &AYTCharacterBase::LookUpAtRate);

  • @fn0rd-f5o
    @fn0rd-f5o Před 4 lety

    Curious why you initialized the values for BaseTurnRate and BaseLookUpAtRate in the constructor and not the header file. Is this an Unreal convention?

    • @DevEnabled
      @DevEnabled  Před 4 lety

      I don't think there's anything in Unreal to specify that approach. To be honest, it's just the way I was taught and am familiar seeing it done so it's mostly a subconscious workflow. Now you've mentioned it though, it's probably safer to initialise them in the Header. If you get the chance to try the changes, let me know what you find.

    • @fn0rd-f5o
      @fn0rd-f5o Před 4 lety

      ​@@DevEnabled I always was taught to initialize in the header so you don't get any undefined behavior, however rare it is. The thing with coding is there is always more than one or two ways to skin the cat. ; )

  • @kimcorson4458
    @kimcorson4458 Před 4 lety +1

    Most definitely you need a visual example of what will be done in this :/ i cant tell if it is jsut input or if it will helop my character move around.

    • @DevEnabled
      @DevEnabled  Před 4 lety +1

      Thanks, but I mean what am I meant to show an example of? As the title and the thumbnail both clearly indicate, we're looking at the Input Implementation. The movement will be covered in the video titled Character Movement.

    • @unrelentingpest
      @unrelentingpest Před 3 lety

      @@DevEnabled Maybe he meant some sort of console log, like "Forward input was received"

  • @abrahamyehoshuafrias3390
    @abrahamyehoshuafrias3390 Před 5 lety +1

    There is any diference between visual studio and vs code. Cause you made up for both of them. And here you use visual studio but no vs code

    • @DevEnabled
      @DevEnabled  Před 5 lety

      Visual studio has the capability to build and easy debugging. I personally prefer VSCode which is why I've shown how to use it in the past, but for bigger projects or longer series like this where I will be working with it for longer periods of time, Visual Studio has more capabilities so it's been easier to just use it for the whole project.

  • @alexandersh895
    @alexandersh895 Před 3 lety

    nice

    • @DevEnabled
      @DevEnabled  Před 3 lety

      I'm looking forward to the day I have a one-word comment from you on each video😂

    • @alexandersh895
      @alexandersh895 Před 3 lety

      @@DevEnabled someday

  • @Viterkim
    @Viterkim Před 4 lety

    Is there a reason why variable names are capitalized, aren't those for class names?

    • @DevEnabled
      @DevEnabled  Před 4 lety +1

      Different languages and variations of those same languages tend to have variations on programming standards. This is just the Unreal variant of C++. You can go with your preference for capitalisation, naming conventions etc. but you may find you struggle when it comes to working on projects with other developers if they stick to the given platforms standard conventions. Generally, in my tutorials I tend to go by the given engines standards so you'll see the code in the Unity tutorials I have in the works very different from my Unreal tutorials.

  • @TheFastWarriorGames
    @TheFastWarriorGames Před 4 lety

    hey great tutorials, I recently found an error when building in visual studio. it said that i can't there is no need to include these lines:
    CameraComp - CreateDefaultSubobject(TEXT("CameraComp"));
    CameraComp->SetupAttachment(SpringArmComp);
    Does these have to include for further tutorials, or did i just messed somthing up?

    • @DevEnabled
      @DevEnabled  Před 4 lety

      Hey, thank you. I don't quite understand what you mean. If you're still just in the code you tend to get a lot of false error/warnings which you just get used to ignoring. The main thing is that the compile in the editor is running without returning errors.

    • @TheFastWarriorGames
      @TheFastWarriorGames Před 4 lety

      @@DevEnabledthanks for the quick response, I have taken some coding courses a year ago and was trying to get back into coding, the problem is that the build would fail if I add these lines. If I delete these there are no errors whatsoever and the program can build successfully. I hope this doesn't bring any problems further in the tutorials. I leave it out for now and if it gives me troubles I will try a way to fix it. I'm using unreal engine 4,25 and visual studio 2019. Thanks in advance!

    • @DevEnabled
      @DevEnabled  Před 4 lety

      @@TheFastWarriorGames Yeah you should be fine. I think others have mentioned that recent versions show that variables are being declared twice due to some engine changes. I've actually just started releasing videos in a new C++ playlist which are intended to be a little more detailed and also following the updated standards.

    • @MatthewCC0311
      @MatthewCC0311 Před 4 lety

      If that text is exactly what you put into your code, the problem I see is that you put " - " when you should have put " = "

  • @mattgraves3709
    @mattgraves3709 Před 3 lety

    Teach a man to fish...Thank you!

  • @DanielOraraVA
    @DanielOraraVA Před 4 lety

    is it more efficient to just include it in the .h, and will the .cpp file also automatically include with since it include whatever is in the .h?

    • @DevEnabled
      @DevEnabled  Před 4 lety +1

      Give it a go and find out what happens, genuinely a great way to learn and it will take you about 2 minutes.

    • @DanielOraraVA
      @DanielOraraVA Před 4 lety +1

      @@DevEnabled not with my laptop xD

    • @DevEnabled
      @DevEnabled  Před 4 lety +1

      @@DanielOraraVA Ha, fair. In general includes in the header do not filter over to the code file. And forward declaring things in the header is the cheaper option than using the #include which is only really needed in the code file as that's where you'll be calling functions and setting values on the references.

  • @whoknows4728
    @whoknows4728 Před rokem

    Im fucking hate unreal for its behaviour. Its just crashing on compiling and loosing all files

    • @DevEnabled
      @DevEnabled  Před rokem

      development definitely isn't always smooth sailing.