Character child mesh not updating unless moving

Hello,

This problem has really ruined my night so before I go to bed I will try to get an answer from the community :slight_smile:

I have created a new class inheriting from ACharacter and set up the following structure:

PlayerBody = CreateDefaultSubobject(TEXT(“PlayerBody”));
PlayerBody->AttachParent = GetCapsuleComponent();
PlayerBody->RelativeLocation = FVector(0.0f, 0.0f, 0.0f);

CameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));
CameraComponent->AttachParent = PlayerBody;
CameraComponent->RelativeLocation = FVector(0.0f, 0.0f, 75.0f);
CameraComponent->bUsePawnControlRotation = false;

PlayerShoulders = CreateDefaultSubobject<USceneComponent>(TEXT("PlayerShoulders"));
PlayerShoulders->AttachParent = CameraComponent;
PlayerShoulders->RelativeLocation = FVector(0.0f, 0.0f, 0.0f);

PlayerArms = CreateDefaultSubobject<USceneComponent>(TEXT("PlayerArms"));
PlayerArms->AttachParent = PlayerShoulders;
PlayerArms->RelativeLocation = FVector(0.0f, 0.0f, 0.0f);

PlayerHand = CreateDefaultSubobject<USceneComponent>(TEXT("PlayerHand"));
PlayerHand->AttachParent = PlayerArms;
PlayerHand->RelativeLocation = FVector(30.0f, 0.0f, -20.0f);

So I pretty much add a couple of scene components that I later manipulate to get head bobbing, weapon movement delay, shoot animation (I want it all programmed and not animated with 3D software, doing it in code keeps it more flexible) hands moving when jumping etc. The problem is that the position of the weapon is not updating when I am not moving! I know that this has something to do with the physics simulation not being used for ACharacter but I do not know how to fix it… (if I activate physics simulation the position of the “hands” are updated correctly but the movement does not work as expected).

It seems as if it only the visuals that are not updating, the transform seems to update if I look in the details tab while being in Play mode.

Here is a video of the problem:

For some reason you have to call UpdateChildTransforms() on the root component or scene component highest up in the hierarchy when standing still, annoying but at least it sorts the problem.

Have filed a bug report on the issue: https://answers.unrealengine.com/questions/236383/updatechildtransforms-needed-when-standing-still-n.html