[c++] AddMovementInput function Unexpected Behaviour in Multiplayer
Version: : 4.8.0-2579680
OS: Windows 7
Using the AddMovementInput function on a Character class does not behave as expected on a multiplayer client. Any changes made to the ScaleValue float input have no affect on the client. The client behaves as if the value is always 1
Start new c++ project with third person template.
Open the "ProjectName"Character.cpp file under "C++ Classes/"ProjectName""
Inside the MoveForward function change the line
Recompile the project
Under Multiplayer Options set number of players to 2
Both the character for the server and client will move at a slower speed then normal when moving forwards or backwards
Only the server side character moves at a slower speed, the client side character moves at full speed.
I have reliably reproduced this behaviour multiple times using these steps for version 4.8.
When using version 4.7.6 using the same steps as above, the client and server behave as expected
Similar behaviour can be seen by changing the scale value of an axis mapping in the Project Settings/Input
I confirmed that changing the movement speed in code does not affect the client as expected. As you mentioned, this functionality is working in 4.7.6. The difference in behavior between the engine versions has been reported for investigation. As a note, doing the same setup through blueprints gives the expected result (both client and server react the same).
answered Jun 25 '15 at 04:42 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here