Sudden loss of movement speed when using acceleration curve in multiplayer as character approaches maximum speed.
EDIT: Video of symptom can be seen here --> https://youtu.be/TDJ0oo5n2Qk
For the last few months I've been battling this annoying issue whereby a game character in multiplayer will be running along and suddenly loose speed due to some weird network correction. I've whittled down the issue to what seems to be getting close to maximum speed while using a variable acceleration value.
I have attempted to work on the issue in blue prints, using UpdateMovement callbacks, custom C++ character and movement controllers and still I keep hitting this damn problem. Its really feeling like some bizarre bug. Especially when I can jam up the character's max walk speed and the issue is deferred along.
1: Create a new project based off the Third Person template. Remove the walls around the level and expand the base floor to 50x scale in the X+Y so you have plenty of room to run around
2: Open up the "ThirdPersonCharacter" blueprint
3: Add a Float, name it "CurrentSpeed"
4: Add a CurveFloat, name it "AccelCurve"
5: Set two points in the AccelCurve to the following values
6: Create a Widget and name it "HUD"
7: In that widget, create a Text, and bind its text value to the "CurrentSpeed" of the character
8: While also in the widget, make a progress bar and bind its value to current speed. But 'MAP Range' the value range so 1000 = 1. Thus ProgressBar is full when speed is 1000
9: Back in the ThirdPersonCharacter blueprint
10: Set the value of MaxWalkSpeed of the CharacterMovement component to "1000"
11: Add to the blueprint event graph the following nodes
Start the game, in normal single player mode in the editor. Run around gathering up speed. You want to get to the speed of 1000.
You will notice as your spread increases the acceleration slows down.
Stop the game
Now start it up again but in Dedicated Server mode
Open the console and type in the following command
Run around as you did earlier.
NOTICE: That as you reach the near the maximum speed of 1000, you will get movement corrections and you suddenly loose a MASSIVE amount of speed. Possibly dropping down to 600 to 800 speed.
Feel free to add additional debugging to compare your server speed and client speed. What you will see is that on the server it will suddenly show you slowing down for no real reason and because of this it'll make a significant correction.
Try changing the MaxWalkSpeed to 1100, and notice the issue happens far less when hitting 1000. Set the value and see that the issue happens as you approach maximum speed.
This issue happens on 4.15, 4.19, and 4.20. Will try 4.21 soon after downloading it.
Older post here trying to look into the symptoms https://answers.unrealengine.com/questions/814703/index.html
Follow this question
Once you sign in you will be able to subscribe for any updates here