Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Character Movement Run Speed?

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...

Product Version: UE 4.22
more ▼

asked May 10 '19 at 06:59 PM in Using UE4

avatar image

MostHost LA
21 2 3

avatar image Lardo Deepdelver May 10 '19 at 08:01 PM

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

avatar image MostHost LA May 10 '19 at 11:42 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered May 10 '19 at 10:32 PM

avatar image

470 11 18 29

avatar image MostHost LA May 10 '19 at 11:39 PM

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?

avatar image norlin May 11 '19 at 12:57 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question