Attached actor doesn't update until parent moves

  • I have two networked characters.
  • I attach one character to another with AActor::AttachToComponent(), no issues.
  • I rotate the parent and both rotate as expected, no issues.
  • I rotate the attached character remotely, nothing shows on the client.
  • I check in the editor and can see that the rotation has replicated down, it’s just not visually showing
  • As soon as I move or rotate the parent in any way, the child rotation visually applies

Is it expected behaviour that actors attached to other actors don’t update their rotation until their parent actor moves?

Hi.
for the attached actor, when you attach an actor to another the [Net] Relevancy properties gets override by the “parent” (the actor on top) so be careful about the tick bAlwaysRelevant just in future cases (not related to your current problem)

for checking attachments and updating actor movements unreal like most of other engines. uses DirtyFlag programming pattern for updating transforms in scenes for performance reasons. and that’s why that behavior happens . as you mentioned:
As soon as I move or rotate the parent in any way, the child rotation visually applies.
being honest i don’t know how to invoke the update manually you need to do some googling. let me know my babbling gave you enough search keys to do more farther research. Good luck man!

link text

Thanks, this is a great starting point!

Fixed it:

Calling RootComponent->UpdateComponentToWorld() updates it, so I set this to be called per-tick on the simulated proxy only when this specific case was active.