Rotation doesn't works as expected
Xoxyi opened this issue · 3 comments
I worked with the newModel() function and the default rotation ( {0, 0, 0} ) do not correspond to the one of the 3D softwere.
Make sure in your 3D software you're exporting with the +Z axis pointing upwards, and a right-handed coordinate system. If the coordinate systems do not match between your 3D software and g3d, then the model will appear rotated.
thank you for the answer, it was indeed the problem. Is there a way to change the coordinate system in g3d (+Y pointing upwards)?
Yes, but it's not simple. I would start by changing the up vector in the camera from {0,0,1} to {0,1,0}.
The +Z coordinate system was chosen because it's a sensible and common coordinate system, I would recommend you give it a shot.