Possess character, server side? client side?


I am trying to switch between two pawns, this is working fine with the possess function. I am using the LevelBlueprint for switching as this was shown in the example from the marketplace. The game i am making however will be a multiplayer game, so there will be either a listen or dedicated server running. When I switch my character and move around, the first 5 or so seconds the character doesnt function properly (pickups dont work) and then after a short period of time the character jumps back to where it was when i possessed it, and then all is functioning just fine.

I guess this has something to do with making the swtich happen serverside? All examples i could find were singleplayer examples, in which switching, like it was shown in the example, works just fine. But as soon as you try this on a client/server setup, it doesn’t.

What am i doing wrong??

Thanks for the help!!

it should be done on server side. post relevant graph so it’s easier to see what went wrong.

Well i am using this very simple setup in the level blueprint:

But the problem is that I can not call a function on the server using the client in the level blueprint. And in the controller i can not get a reference to the other pawn (TopCamera). :S

Thanks for the help!

use the RPC call( event set to RunOnServer in replication. )
check wiki on blueprint respawn, it also has possession part, should be the same principle for you.

That is working superfine! Thanks PenguinTD!!

It really worked for me too! Thanks PenguinTD !

I had the same problem. I have a Main Character with Skeletal Mesh and a Pawn that was spawned by the server. When the character was possessing the pawn everything was working fine.
But when i was trying to repossess the character in the client the animation was just freezing.!

Thanks to this solution everything now works fine! Thanks again PenguinTD :slight_smile: