Reputation:
I already tried to fix this, and have searched a lot, but I did not found anything that could help me.
I want to make a sprinting system which works in multiplayer.
Here is my actual code:
My character is sprinting (so the speed is changed), but the client-view is weird. I do not know how to describe this. The server view is correct.
Thank you for your help!
Upvotes: 1
Views: 2281
Reputation: 51
First of all, by far the best way to go about doing authoritative networked character movement would be to do this in C++. You can learn how to do this by following this guide.
The weirdness that you might be experiencing on the client side is usually caused by corrections that are made by the server. This is usually because some variables or functions are not being replicated properly.
You'll have to setup a RPC function that enables and disables sprinting on all clients. On the server side of that RPC function is where you'll want to be modifying your Max Walk Speed.
Upvotes: 0