Jump to content
  • 0

How does the rotation values work pls?


Message added by TopicLocker3000

This topic was automatically locked after 6 months of inactivity. If you are the topic owner, please contact a moderator to have it unlocked.

Question

I just recently came up with this idea of making a script that turns .miobject files to .mimodel files, that is, to simplify mineimator models

but there's this issue when I try to apply the rotation changes affected by parent objects to a given point, sometimes it works but sometimes give bugged results, especially when multiple axies are rotated at the same time.

I think it's have something to do with the method MI used to rotate objects, but I don't know how exactly it is done tho  :(

anyone has an idea?

par_pos[:-1, -1] = [0, 0, 0]
par_rot[:-1, :-1] = R.from_euler('xyz', [90, -90, 90], degrees = True).as_matrix()
par_sca[:-1, :-1] = np.diag([1, 1, 1])
chi_pos[:-1, -1] = [8, 8, -32]

matrix = np.dot(np.dot(par_pos, par_rot), par_sca)#scale * rotation * position (?
final = np.dot(matrix, chi_pos)
print(final[:-1, -1])

here's the test code for instance, I did it  using a 4x4 matrix for the transformation matrix

for some reason it gave a wrong answer especially when both rotating at X and Y axis

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...