I’m trying to make vehicle possession in multiplayer. This is inside the Third Person Character BP.
The Server custom event is set to run on server, the Client custom event is set to multicast.
Everything is working until the attach actor to actor, but when the possess node gets executed, both the server and client can possess the vehicle, but on the client side the original character just disappears. Also, if the server’s character is in possession of the vehicle, the client side sees that the server’s character disappearing. From the server side, everything looks as intended.
I tried everything you wtote,
If I run on server without the multicast, then the character not disappears but not snapping to socket either, just walks away.
RepNotify did nothing (I don’t really understand the “on notify disable collision on the client” part)
Before the get node is just an array for which vehicle is it interacting, but without that just a simple reference works the same.
I made a reorder in the nodes and it is seems to be working now, but with only this socket (root bone), it is disappearing with the others for some reason
I don’t do anything with the 0 2 3 yet (it will be like if the Vehicle Option is for example 3, then it will get the index 3 reference in the array and that will be the parent for the attach)
Do you mean like this? Because it is just not snapping where it need to be. My half solution is setting the root where will be the driver in the modelling program because for some reason, only the root works for both player to see.
closer, but the SetActorCollision has to be on RepNotify but we can come back to that later.
so the issue now is you need validate the REF which you’ve done and after the GET node, put a print string or breakpoint on the IsNotValid path and see where it breaks down
RPC the Server (controller Auth Proxy) to Call an event in the GM to handle the possession.
Have the GM disable CMC (set movement mode to None), Disable Capsule component collision and Mesh collision, set the mesh and Any attached meshes to Hidden in game.
Unpossess the character
Attach the character mesh to the Vehicle
Possess the vehicle
Reverse for exiting the vehicle.
Alternatively you could attach the character to the seat as if it’s driving. Still have to disable cmc/collisions etc.