Converting 3ds Left hand to OpenGL Right hand - where did i go wrong?
I am using the following script as a part of a level exporter for an OPENGL game
format "\t\t<position> " to:currentFile format "% " body.pos.x to:currentFile format "% " body.pos.z to:currentFile format "% " -body.pos.y to:currentFile format "</position>\n" to:currentFile format "\t\t<rotation> " to:currentFile format "% " body.rotation.x_rotation to:currentFile format "% " body.rotation.z_rotation to:currentFile format "% " -body.rotation.y_rotation to:currentFile format "</rotation>\n" to:currentFile format "\t\t<scale> " to:currentFile format "% " body.scale[1] to:currentFile format "% " body.scale[3] to:currentFile format "% " body.scale[2] to:currentFile format "</scale>\n" to:currentFile
but when i rotate the 3ds max scene, the XML once loaded into my opengl game will be slightly out in a weird way if the following axis (right hand system) are both non 0: xy, xyz
I believe it's because the rotation system in 3dsmax isn't simply a x, y, z it's an euclidean, x, y, z, w
but I attempt to read the doco and its just confusing...
is there anyway I can export X/Y/Z rotation from 3dsmax for an OpenGL game or do I need to include X/Y/Z/W?
Comments
Are you try with
Are you try with "quadToEuler2".Read this for more info
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=fil...
bga
haha you always find stuff I
haha you always find stuff I sware to god I look for ages for.. But quad is better anyway because our system uses it, before i was converting the Vector3 into one, it was stupid, but I didn't know we were as that was another members work
I'm almost certain now that
I'm almost certain now that it's somthing to do with missing w, can sombody please just confirm?
Edit:
confirmed, to get full rotation from 3ds max you must use Quaternion's