Why is my animation distorted when i change the skeletal mesh

If its playing good on one skeletal mesh and not the other it might be because of the way ue4 retargets animations for a shared skeletal mesh.

When it imports a new animation for a selected skeletal asset it doesnt retarget the animation to fit the bones of the original mesh. So what you can do to adjust the animation is to go into the skeletal asset for the mesh that isnt working - right click the root and click swap to skeleton - then from the bone under that press “from animation scaled” and then set the root back to animation

You say blender only exports with one bone? I hate the blender fbx export system so much. So theres a couple of things you can do to make things import better

  1. Set the unit scale to 0.1m and apply said scale to everything (make sure you use the third person mannequin or something for reference after). Dont know why but applying the right scale fixes most of my issues
  2. Make sure that “deform bones” is checked in blender when exporting along with “leaf bones” being turned off under the armature tab
  3. Make sure under the geometry tab on export things are set to face instead of vertex. This will also get rid of the no smoothing errors youll get

This is a bit hard to explain but, when I drop an instance of my blueprint object into the game, the attached skeletal mesh and animation look fine, but if I script a change to a different skeletal mesh and animation blueprint, the mesh becomes distorted. My objects were made and imported from blender. On import unreal only created one bone to encompass the whole object.
It may be a little hard to see but when I click play, you can see the fish becomes completely distorted.

325964-distortedfish.png

Here you can see the bone setup

And finally here you can see on event start i run this function to set the skeletal mesh and animation provided from a struct row.

Any ideas would be greatly appreciated.

Thank you so much for the detailed reply. I will check those blender settings.
I think was unclear in my explanation so here are some further details.

  • The object in blender has many bones, I mispoke, it is the collision shape in the physics object that only has one item, this is seen in my prior screenshot.
  • My fish pawn blueprint contains a default fish skeletal mesh and a separate transform object, the fish is moved by physics thrust and torque towards a randomly generated location of that transform object.
  • When the fish is spawned or dropped into the game manually, on EventBeginPlay, it adopts the skeletal mesh and animation blueprint specific to it. There is a skeleton, physics asset and an animation bp for each type of fish. So based on your response, I don’t believe any retargeting should be going on.
  • I’ve also noticed that I can replicate the distortion in the editor by changing the scale values of the skeleton asset. This leads me to believe that when the item is changed in the game, the scale is either initialize wrong or it is adopting scale (or skeleton) from the wrong default object.