x

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"

Changing MaxWalkSpeed, Deceleration problem

Hello guys,

I'm in this situation. I have a character derived from ACharacter. This character has 3 states: Idle, Walking, Running. I have implemented a simple state machine that changes the MaxWalkSpeed depending on the state the character is in. Everything works as expected, but there is a slight problem. When the character transitions from Idle to Walking or Running, it accelerates slowly as expected and the animations blend as expected. In other words I get good blending when accelerating to a higher speed. The problems is the other way around. If I decelerate I get no blending. For example, the character is in Running State, I press the toggle Walk/Run button, the character enters Walking State so my MaxWalkSpeed goes from 550 to 220, but the deceleration happens instantly so my animations don't blend nice. I tried playing with the settings of the CharacterMovementComponent, but I can't seem to make it work. The wanted effect is the deceleration to be the same as the acceleration, so the animations blend nice. I can always write my own version of acceleration/deceleration logic, but I want to use the CharacterMovementComponent, because I believed it should cover this scenario. I'm writting this question for tips. I have atteched my CharacterMovementComponent settings as an image.

Best regards.alt text

Product Version: UE 4.15
Tags:
more ▼

asked Apr 12 '17 at 10:19 AM in Using UE4

avatar image

kbrizov
94 6 17 23

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

In my Project, i use the MaxiWalkSpeed value to adjust movement speed, and i get a nice blending from MaxiWalkSpeed=200 to MaxiWalkSpeed=0 I only modified the "Ground Friction" Walking "braking deceleration Walking" and other unrealated stuff

Your "braking deceleration Walking" seems to be very high, maybe adjust that. In case you have not tried it.

EDIT: My settings:

alt text

wut.png (21.8 kB)
more ▼

answered Apr 12 '17 at 11:24 AM

avatar image

TankbusterGames
241 10 11 23

avatar image kbrizov Apr 12 '17 at 11:44 AM

Thanks. I played a lot with these settings and I seem to be getting better results. Turns out my blend spaces could use tweaking too. I just have to find the best combination of friction, acceleration, deceleration for my animations. That process sure is annoying as hell :D. Your answer was helpful. I was wondering if my workflow was right.

avatar image kbrizov Apr 12 '17 at 02:41 PM

Hey Tankbuster, I found the perfect solution. There is an option in the CharacterMovementComponent called "Use Separate Braking friction". That way you can have high friction for the character overall (It doesn't drift when making turns) and at the same time have a low friction when stopping. That gives an awesome smooth blending. You probably know about this :)

avatar image TankbusterGames Apr 13 '17 at 09:56 AM

Oh, since im very new to unreal i didn't know about this. Thanks, it works well, and i can use it, too. =)

avatar image GeneralGir Feb 21 '19 at 05:35 PM

braking friction is greyed out for me, which I assume IS the seperate braking function.. and so when I implement the node "seperate braking" inside the blueprint graph it still doesnt change anything.

(comments are locked)
10|2000 characters needed characters left
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