[Closed] transforming rotations
hi all
I have a task to take some objects from Unity to Max ( yes Unity to max and not the other way around ). So position, easy a quick swap of y and z positions and done but rotations are much more difficult.
I am hoping someone would explain exactly what i need to do because i have ready some articles about converting rotations and i have not understood them enough to write something that works.
In a nutshell max is z up and Unity is Y up, on top of that they are right and left handed so im at a loss at what to do with the rotations to to convert them between right/left handed coords.
Any help would be greatly appreciated
Thanks
Dave
Not tested but it worked from Deep Exploration to 3dsmax and Deep Exploration has the same axis as Unity.
local node = $
local mtx = matrix3 1
-- fill mtx with the matrix elements (row1, row2, row3 and row4) of your object matrix in Unity
local mtxModif = matrix3 1
local maxMatrix = matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0]
mtxModif = xformMat mtx maxMatrix
node.transform = mtxModif
Hope it helps!
Yes, you’re right !
It lacks half the code there ! I was kind of busy when posting the answer, sorry.
I will post the rest tomorrow morning at work.
to make things easier post a sample max file with two objects: originally imported from Unity, and how it has to be in max.
it will help to find transformation matrix.