(Server/Client) Picking up and dropping objects differ after being spawned

UE4 Version 4.27.2

I am creating a project and I had a problem, it turns out that when an actor is available in the default world you can interact and pick up the object, but when you spawneas it through an object or in this case through the G it can no longer be picked up, I have recreated it in a clean project and the result is the same.

Object:
Simple blueprint (without code)

ThirdpersonCharacter:

Finally what is the result?

It always works correctly when the object is already in the world on both client and server, both can pick up and drop the object.

Serverside:

Clientside:

The problem comes when the object is dropped and tries to catch again, the result in client is fast:

Simply in your camera does not disappear, due to the variable you can no longer drop again.

Simply in your camera does not disappear, due to the variable you can no longer drop again (It is evident that the client can not perform the collection of the object when before yes).

Apparently this is the result that one would expect from this action.

All the times that the server has dropped, it has duplicated the objects in the client and of course, every object that it takes, does not disappear.

EDIT: Occurs in both spawnActor From Class and Add child actor

According to this reddit post, Spawn should not be called from multicast but from server and then replicate it to the client, at the moment it works perfectly on server, I am still working to try to solve this problem.

Also reviewing the spawn of the projectile of the UE4 itself I see that it is, I will try to give a solution to this problem.

Thanks to Gramb_poe and dkilkhan

Key G + Event (Drop)

Handle focus

2

Key E

Key E (Events):

In object remeber (replicates check)

5

And replicates On Hand.

Important: An actor can be generated in multicast, however it brings future problems.

EDIT: The problem was mainly eradicated in the multicast event to generate an actor.

1 Like