Hi All,
Trying to understand why the Character Movement has no built in space for Running speed variation.
Has anyone added a section to this in C++ before? Would it not be beneficial to do so while also creating a way for the engine to just use this value via blueprint with a custom blueprint function?
Input Action > Sprint Bool > Sprinting Function (from char movement)
A simpler alternative would be to just store the Min/Max values so that you can use the Set MaxWalkSpeed as every tutorial does, but you don’t have to manually enter values, you can just read them from where everyone already went to set them on a “per character” basis…
depending on what your target game is, that becomes more or less complicated.
For multiplayer the CharcterMovementComponent is fun,
have yet to find a good tutorial or guide for it
Not sure why it woudn’t be “common” almost any character has a variable speed of some sort. it can be Running Jogging Walking most commonly, but it’s also just a variable speed for some other types of characters.
And yes, instancing it as a self defined variable does make sense - but thinking ahead for online purposes wouldn’t it make more sense if this was handled in the protected movement component?
Not sure I understand your question correctly, but you can easily setup the 2 (or more) speed values for your character – just add the required variables and use them when switching between your run/speed/walk modes. It’s just not a common option so it was not implemented by default.
Not sure a tutorial would do any good the way things are now - watching someone code C++ on youtube is just about as nice as watching paint dry. Though, a nice “ancient” style text version walk-through of what the module already does would indeed be nice.
Everything is a “self defined variable” if dig the code Also you can always make a derived class from the ACharacterMovementComponent
and add the protected/private variable inside that class.