Ladder don't work on client
I have a ladder actor which change the player movement from walking to falling. While the player is in the ladder-volume I change the movement velocity on the z-axis depending on the user input. This works perfectly on the server but the client don't want climb up. I heard that I have to set the movement first on client and then repeat it on the server but this also dont work.
How can I achieve that this will work? Maybe I am on the wrong path?
You should for now just do everything related to movement and your character on the server.
This means: Spawn your character on the server, add movement commands on the server and do this type of ladder climbing on the server. In your character check "replicate" and "replicate movement" which will keep your client updated but everything related to gameplay should be done on the server.
For testing and lan games that works just fine with quite small delay. I didn't work too much with it and am not sure how it's properly optimized in Unreal or if that's possible to a good degree in BP itself. In theory what you wanna do is usually do everything on the server but also estimate what would and probably will happen on the client updating it with the server info but instead of having the delay between:
Send movement command to server -> Server executes movement -> Movement is replicated to the player -> Player moves.
What you do is:
Move player where it probably will be -> Send movement command to server -> Server executes movement -> Movement is replicated to the player -> If something different happened on the server than on the client update to that.
The obvious benefit is that it's more responsive. The downside that you may have a bit of teleporting and this weird type of glitching behind / forward if you have a large delay.
Just to give you a quick overview.
answered Nov 22 '15 at 01:23 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here