I rotate some objects in FleX, export them and render them in Blender. I realized that the rotations I apply to the objects in FleX does not rotate the objects in the same way that Blender does. If I’m getting it right, I learned that FleX uses a transform matrix to rotate the objects but Blender does not [necessarily] do that. I also talked with someone who is using the FleX plugin in Unity and he said he has the faces similar issues. This is the case for both Euler angles or Quaternions. Below is the piece of code that I use to rotate the objects in FleX. I’m pretty new to FleX and I don’t know which functions I should use so that I can get the same rotations as I get in Blender. Can someone help me with this?
For rotating with Euler angles:
obj->Transform(RotationMatrix(rx, Vec3(1.0f, 0.0f, 0.0f))); obj->Transform(RotationMatrix(ry, Vec3(0.0f, 1.0f, 0.0f))); obj->Transform(RotationMatrix(rz, Vec3(0.0f, 0.0f, 1.0f)));
For rotating with Quaternions:
auto x = rx; auto y = ry; auto z = rz; auto w = rw; obj->Transform(RotationMatrix(Quat(x, y, z, w)));