Child Actor Only Owner see dosent work

Hi. When i add a weapon to my inventory in my game. I set the new owner using a event in the childactor class. The problem is that when i set the mesh to onlyownersee then the mesh dissapiers despite having a valid owner.

Player.h : hastebin Player.cpp: hastebin

Weapon Class.h: hastebin Weapon Class.cpp: hastebin

Solved ! The Childactor class has its OWN Owner. I only set the owner on the child comp and not on the childactor.

Can you be more specific please, i need help with this, thank you.

@Gunschlinger Could you explain?

The owner that has the childactorcomp is not always the same owner that the childactor has. Since the component essentially just spawns and attaches a actor. To set the ChildActor Owner to the Owner of the component you can just get the ChildActor and call SetOwner on it

1 Like