I’ve tried your expoter to not avail. The motion exported includes ridiculous rotations from simple movements (i.e. 70° in Blender but 2000° in LW), I’ve discovered you’re assuming that LW requires angles for rotations in the .mot file, when in reality asks for radians. Adding three lines solves the issue but the motion is still not correct.
Val = -mat.toEuler().z
Val = (Val * 3.141592)/180 ## convert deg to rad
I’m still trying to understand how rotations work in Blender, I’m not shure if its due to quaternions but the rotations I got from Blender doesn’t work in LW.