Possessing a pawn (vehicle) in a multiplayer session
I am trying to setup a multiplayer game where clients spawn as a first person pawn and I want them to be able to use vehicle pawns.
I followed this tutorial to setup my vehicle as a secondary pawn you can possess:
So Single player wise, everything works well but when I try using it in a multiplayer session, I have some problems:
So I am aware that this tutorial wasn't made for a multiplayer game but if I wanted to make this work, how should I do it?
asked Jan 07 '15 at 04:46 PM in Blueprint Scripting
You need to make sure your movement events are called on the server instead of the client. This can be tested using the isAuthority call. Only the server will have authority. On your events check if they replicate to the server.
I just took a quick look and it seems that key input events can't be replicated so I would suggest having the key input event call a custom event that is replicated. then have all the movement logic called by the custom event instead. That would allow it to replicate properly.
Follow this question
Once you sign in you will be able to subscribe for any updates here