Child Actor transform zeroed for clients when "Replicate"

Steps to reproduce:

  • Create two blueprints from Actor, name them Parent and Child.
  • Set a static mesh component or something in each to visualize them.
  • Add “Child” as a Child Actor in Parent. Move the Child Actor, rotate and scale it.
  • Check “Replicates” for Child Actor
  • Place Parent in scene. Play scene with 2 clients.

Expected Outcome:

Both server and client should see Child moved, rotated and scaled within Parent

What really happens:

Server sees Child moved, rotated and scaled within Parent, but for the client Child has reset its transform.

Same result happens if Child has replicates unchecked, and after a delay has it enabled through a blueprint.

Hey -

Just to make sure I understand what you’re doing, when you add the child in the parent and then move the child, you’re moving/rotating/scaling from within the parent correct? Also, what version of the engine are you working in?

Yeah, moving the childactor component.

4.5

A temporary fix I found was to store the initial transformation of the actor on Begin Play, then enable Replicates, wait a short while, and then set the transformation to the stored value when client.

Like this (added in Child):

I am attempting to reproduce this and want to make sure I’m following the same steps you are. The first thing you do is to create a blueprint (parent) and add a static mesh to it. Then create another blueprint (child) and add a static mesh to the second blueprint as well. Then you add a ChildActor component to the parent blueprint and transform the ChildActor component. After that you add the parent blueprint to the level and then play in editor with 2 clients set? Are there any steps I’m missing to reproduce this bug?

Cheers

Yes, the ChildActor uses the second blueprint (child) when specifying class. Also, the second blueprint (child) has to be checked as replicates.

Hey -

Thanks for the information. I was able to reproduce this internally and have submitted it to our tracking system (TTP #349495).

Cheers

I’ve hit the same problem, though mine went completely insane as both static mesh components simulate physics. On the client side this ends up with the 2 components trying to occupy the same space.

Fun to watch but not very useful.

Is there a scheduled fix in the pipeline? I was hoping there’d be something in 4.6 alas there was not. Is there somewhere I can track TTP #349495?

Hey -

This is still being investigated by our engineers. It is difficult to give an exact time frame for the fix but we are working to fix this bug as quickly as possible.

Thanks

Thanks . Thought I’d just check to see if there was a public bug tracker item I could ‘watch’ or subscribe to.

I still had a problem with this in 4.25 and 4.26. I had an actor and inside that actor a child actor with a static mesh.
When I set my child actor to replicate then the problems happened as the title state.

I the log file and it said that it couldn’t move my static mesh because the “Mobility” was set to “Static”. So in my child actor I set the static mesh “Mobility” to “Moveable” and I also turned on replicate for the parent actor.
Now it is working as expected.

If you don’t want your Static mesh in the child actor to be moveable you can set it back to “Static” on the begin play using “Set Mobility” node.