Download

DetachFromComponent breaks my actor replication

Hi all,

I seem to be continuously running into really strange issues in my project. I feel that I’m doing well in understanding replication, but I’m trying to do something pretty simple and the process is specifically breaking when I attempt to detach my actor from my character and/or start simulating physics on the actor. Below is a brief workflow of what I’m doing:

-I right click an item in my inventory widget and that calls a function on the server to spawn that item (an ammo magazine) attached to my pawn’s hand. My plan here is to eventually have an animation where the hand moves to grab a magazine off the ammo belt before the item is spawned

-I then call a DropItem function on the server to drop the item from my pawn’s hand and update the player’s inventory to remove the item

I have this ALMOST replicating perfectly, but for some weird reason, when I execute either: DetachFromComponent, SetCollisionEnabled, Set Simulate Physics, or Set Enable Gravity (all to make the item fall and bounce around on the floor), the item never appears from my client’s view. The server sees it fine when either the server or client drops the item, but the client isn’t seeing it spawn at all. If I skip all those nodes, the client sees it spawn, but then it’s stuck floating in the air since it doesn’t have its physics/collision/gravity enabled. Does anyone have any pointers as to what could be wrong?

I found that there was a bug that might relate to this, but I just upgraded to 4.25 and I’m still having this problem.

https://dq8iqaixvew1d.cloudfront.net…_22/index.html