Attached skeletalmesh don't sync with animation in game

I have 2 skeletalmesh, my character mesh and a sunglass mesh.

  1. I created a socket from character’s head bone call it “socket_sunglass”.
  2. I drag the sunglass mesh from content browser to “socket_sunglass” as a preview mesh.
  3. In the character’s bp, I add skeletalmesh component under character’s mesh. (the component’s parent)
  4. In the character’s bp, I set the component’s parent socket to “socket_sunglass”

result:

In persona, sunglass sync with every character’s animation, no problem noticed.

In game, when the character play walk animation, the sunglass is out of sync.

how do i make the attached mesh sync with my character’s animation? Please help.

additional information:

  1. I’m using UE4.7.3
  2. I set camera’s AA to FXAA instead of the default TXAA (either way the sunglass is not synced in game)
  3. I’ve tried attached the sunglass mesh via blueprint AttachActorComponent but still the sunglass is out of sync when walking.
  4. I tried set the parent socket to head bone, but still out of sync.
  5. I tried doing the same thing using UDK, and everything is ok, no out of sync when playing animation.
  6. Beside reimport the character with sunglass as a single mesh, I have ran out of ideas :frowning:

2015/03/26 additional information

I found that, if i retarget my character mesh’s hip bone to “skeleton” instead of “animation”, then the sunglass mesh will sync with the animation.

but the whole animation look weird, since it didn’t use the animation’s translation, is there a way to solve this problem?

please help.

After searching several posts, I partially track down the problem:

My walk animation is driving my character’s hip bone translation, but the “socket_sunglass” is driven by my character’s skeleton. which then causes the attached mesh and the walking animation go out of sync.

This is why if I retarget my character’s hip bone to skeleton, then the attached mesh and walking animation will go synced again. (but the animation will go very weird, since it lost some of the animation data in hip bone)

But still, there’s something I don’t understand: how come the preview mesh in Persona is synced with the walking animation? Is there a way to attached meshes like that?

please help!

Hi I have this same problem. Did you figured this out?

Heya, sorry for the late reply.

I didn’t found a way to solve the problem. So in then end, I just simply attach the mesh in 3dsMax then export my character’s mesh + additional mesh in a single .fbx file.

Then, after import the .fbx to UE4, I use material alpha to control (show/hide) the visibility of the additional mesh.

Very bad workaround I know, but I’m not smart enough to find a better solution.

:frowning:

If they are using the same skeleton you can attach to root and use Set Master Pose Component and the Target will use the Master’s animations. If you’re doing something that doesn’t need to be skinned (purely rigid) I’d suggest using static mesh component then attaching to a socket should work independent of what animations your are playing.

1 Like

I didn’t thought of using staticmesh as an attached mesh and yes my sunglass mesh is purely rigid.

I’ll give it a try.

Thanks for your suggestion :slight_smile: