Picking up, grabbing objects - replication problem

Problem
Hello, I’m trying to make a pick up, holding system for my game.
Simple system, basically when I click right mouse button then I am able to hold an object and move with it.
I was using this tutorial to do the pick up system
https://youtu.be/bJeigo_Yj1c

And everything works pretty well when a player is playing in standalone mode or as a host but when the client plays on for example dedicated server and tries to pick up an object it doesn’t want to sync across the network - the object picks up on the client which is currently trying to pick up the object but others don’t see his actions.
I was trying multicast, run on server, and even both but nothing seems to work.

Details
I am using first person template.
To manipulate objects I am using Physics Handle component.
I already did synchronize objects’ physics so the movement of objects is fully synced.

How does the system work?
Basically, when I click RMB I send a raycast that “catches” object, and then using break hit result arguments I Grab Component at Location.
I’m not the best at explaining things so if you don’t understand what I mean then everything that I did is in this tutorial video https://youtu.be/bJeigo_Yj1c (it’s only 5 minutes long)

Also photos of my BPs
(To be exact “HoldingPoint” is a replicated scene component from where I send raycasts)



Please help me with this. If you need anything else to solve this issue, let me know.

Set your components to replicate/replicate movement.
Next On input “pressed” switch has authority[remote] → RPC server
Server RPC : switch has authority[auth] → line trace → grab component etc etc

The servers Authoritative Proxy of your character needs to do the action (grab).

edit…

Forgot to mention that actor being grabbed should be a server owned actor. An example would be to have the server authoritatively spawn it and the actor be set to replicate.

One way I do this is to have a spawner class that uses switch has authority[auth] → spawn actor.

1 Like

Big shoutout for the networking master (I mean RevOverDrive of course :slight_smile:)!
Finally, it works thanks to you.

Okay, maybe also let’s leave some screenshots of the solution for the future guys with the same problem.

Solution screenshots


And again, thank you, RevOverDrive.

3 Likes