How do i correctly replicate a child actor?

I have a child actor component in my character. My problem is that when the child actor component on the server tries to get a location of a component (the components inside the child actor) it gets the ones from the client (the last client to join)


Only Relevant to Owner, Net Load on Client, And Replicates is turned on.
I have been playing with the replication settings and i can’t get the server working with the child actor component. This isn’t a problem when the server is the only one in the game, but i figured out that the clients each have one child actor, but for some reason the server is getting 3, for each player in the game, and for some reason the server picks its input for the newest one spawned. I still don’t know a fix for this.

Can you show/explain this:

  1. Where do you add the child actor? Is it in your character from the beginning?
  2. How does the child actor class look like (blueprint of type actor?)?
  3. What is your goal?

E.g. I created a blueprint, called BP_ChildActor of type Actor. In this blueprint I added a static mesh called Cube. I created a custom Event called PrintLocation:

Inside the character I added the ChildActor, select the class (BP_ChildActor) and added this:

Each one prints the “own” location. (Playing from editor, number of player 3, as client and as standalone)

I added the child actor is in my character. this character has basic movement and look functions. My goal is to have a child actor for my weapon, so i can have different actors to vary my logic, but I’m still trying to make it work for multiplayer.

I want to use InputAction Fire inside of my ChildActor.

I found a workaround for this problem. Instead of using the child actor system, I can just spawn an actor.

1 Like