In a multiplayer game, when creating and attaching an actor (BP_Rifle) to a socket that is created on the hand_r bone of the character’s skeletal mesh, the location of the attached actor on the server remains at (0,0,0) when the game is launched as a client. This causes projectiles to not be created correctly.
Creation and attachment occurs on the server.
Actor replication is enabled on BP_Rifle.
“Replication” and “Movement repetition” are enabled on the skeletal mesh.
Attaching to the clavicle_r bone works correctly, and the actor’s location is correctly replicated.
I also noticed that if I remove the custom event that sets the anim overlay state when we equip a weapon, and manually set its variable to the value “Rifle” then everything works correctly.
[Video demonstration of the problem: https://youtu.be/ZU5WTTzs_kc
The video shows how BP_Rifle is attached to the hand_r bone on the client. And how the whole system works. You can watch it on 2x.
Attaching to the clavicle_r bone instead of hand_r seems to work, but it’s not the desired attachment point. I also noticed that if I remove the custom event that sets the anim overlay state when we equip a weapon, and manually set its variable to the value “Rifle” then everything works correctly.