You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The --rotate[xyz] command states that it rotates a mesh in degrees around a specified axis.
Doing some experiments I have drawn 2 conclusions:
This is actually RADIANS
I can not pass a floating point number (like 0.234) to the command. It only seems to parse integers.
I have worked around this issue by using the nearest multiple of 2*PI that resulted in a rough round number. This worked, which seems to confirm my suspicion.
The text was updated successfully, but these errors were encountered:
Due to the keen observation of @DanielBalog86 concerning radians instead of degrees, an easy fix is possible. In obj-magic.cpp, add radians function calls around the 2nd parameter for the calls to rotate, like the following: if (rotangles.x != 0.0f) temprot = rotate(temprot, radians(rotangles.x), vec3(1,0,0)); if (rotangles.y != 0.0f) temprot = rotate(temprot, radians(rotangles.y), vec3(0,1,0)); if (rotangles.z != 0.0f) temprot = rotate(temprot, radians(rotangles.z), vec3(0,0,1));
However, I do not observe that floating point numbers cannot be properly used as input. Instead, I noticed that negative numbers cannot be used properly, similar to #5. If I supply -90, it's using -9. Fortunately, for rotation degrees, 270 can be used instead of -90. For translation, not so much.
In summary, this issue should be resolved with the fix above, leaving the float vs integers portion to another issue. From what I can tell, resolving #5 would improve things a bit if not fix any input parsing related issues.
puzzud
added a commit
to puzzud/obj-magic
that referenced
this issue
Jul 11, 2022
The --rotate[xyz] command states that it rotates a mesh in degrees around a specified axis.
Doing some experiments I have drawn 2 conclusions:
I have worked around this issue by using the nearest multiple of 2*PI that resulted in a rough round number. This worked, which seems to confirm my suspicion.
The text was updated successfully, but these errors were encountered: