Hello, i have two float variables SprintSpeed and WalkSpeed. When the player clicks shift the movement speed has to change to SprintSpeed and when the player clicks shift again it changes to WalkSpeed again. My question is: What is the best way to change the speed ?
My idea is just to use a RPC and it works:
Hereβs a simple Blueprint version of it using Rep_Notify enumerator (CharMoveSpeed).
When you Set/Change a Rep_Notify variables value its OnRep Function is executed. I take advantage of this on the client to force calling the function by changing the value locally.
I then call the server to run the flow logic to make its own determination.