I’m working on a multiplayer FPS game using the standard character setup (separate 1P Mesh set to ‘Only Owner See’ and 3P Mesh set to ‘Owner No See’).
I need advice on the best networking/replication strategy for a held item (e.g., a flashlight or gun) when a player picks it up and drops it.
Pickup: Should the item Actor remain attached to the 3P Mesh (Server Authority) and the owning client simply locally override the visual to attach to the 1P Mesh?
Attachment: Should the item Actor itself have two components (1P and 3P mesh components) with visibility toggled by replication?
Dropping: What is the safest way to ensure proper physics and collision for all clients when the owning player drops the item?
I appreciate any advice or links to tutorials and so.
I’ve figured out the answer. Depending on whether the player is locally controlled or not, I’m attaching the mesh to the first or the third person mesh . And the best way for dropping (throwing) is to use the Projectile Movement Component . Maybe this will help someone.
your self answer is the right shape. one server authoritative item actor attached to the 3p mesh, owning client locally reattaches the visual to the 1p mesh, everyone else keeps seeing the 3p one.
for dropping, rpc the server, server detaches, enables physics and collision there, clients just mirror it. never let the client simulate the drop on its own or the item ends up in two places.
if the held item also carries live data (ammo, durability, mods), that part gets awkward as actor vars. you can also try Blueprint Object Replication, a network plugin for Unreal Engine that keeps the held item state as a replicated object so pickup and drop carry the data with them: https://www.fab.com/listings/e26dcf07-7c78-4e67-8e56-272cf6df8021