Jump to content
  • Advertisement
Sign in to follow this  
papa

OpenGL Swapping axes problem - have question

This topic is 5467 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I exported some objects from a mesh file in which Z axis is the up vector not Y axis as in DirectX or OpenGL. Now when I render these objects in DirectX these object's orientation isnt correct obviously because the up vector in DX is Y axis not Z. You have to basically turn your head to the right by 90deg to view it :) Now every object in the scene has its position in 3D and rotation in angles (radians) xyz. (Vec3D pos, Vec3D rot) I thought I can simply swap Y value with Z value and it will be ok. But its not. Well for vector positions it works ok but swapping angles Y with Z doesnt work. I thought its ok.. how can I swap these angles? Please note I know I caould simply use rotation matrix to rotate teh entire scene but I dont want that. I want to do it the way I started doing.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!