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?
barigazy · 2012-09-15