0xafbf / blender-datasmith-export

Blender addon to export UE4 Datasmith format
GNU General Public License v3.0
388 stars 49 forks source link

Wrong rotation for animated objects #47

Closed zenyaz closed 3 years ago

zenyaz commented 3 years ago

I have 2 types of objects

  1. Air balloon static (internal Blender rotation is 90;0;0)
  2. Air balloon animated (internal Blender rotation is 90;0;0 and some XYZ-changing). All animations are baked frame by frame in blender.

After export to Datasmith i have following scene:

I opened anim_new.json and noticed that rotation coded wrong. When i changed in json file automatically "-90"->"90" for all keyframes, then UE plays everything correctly.

RumbleballTheReal commented 3 years ago

The problem is a missing minus in the x rotation. Just fixed it for our artists. Open the plugin folder, open export_datasmith.py with a text editor, search for rot_fix = np.array((to_deg, -to_deg, to_deg)) and change it to rot_fix = np.array((-to_deg, -to_deg, to_deg)) save the file. Restart Blender

0xafbf commented 3 years ago

Hello guys! sorry for the delay! Thanks zenyaz for spotting the issue and thanks @RumbleballTheReal for proposing the fix. I will integrate it because I have seen it is also affecting other people.

0xafbf commented 3 years ago

Just commited the fix you proposed, so i'm closing this for now.