Jump to content
  • Advertisement
Sign in to follow this  
synthetix

Translate/rotate entire scene to align to coordinate system

This topic is 2509 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

I've written an exporter that takes scene data from one 3D program and exports it to another. It works fine, but the issue is that the first program's scene needs to be aligned to the coordinate system of the second. For example, the first scene will contain a plane that should be set to 0,0,0 to align with the second program's coordinate system. However, it will probably be exported with coordinates like 12,-55,30 or something like that. I need to move the entire scene (which includes a camera) based on this plane. I tried subtracting the odd coords (12,-55,30) from every object in the scene but that doesn't work right. Rotation, for example, only rotates each object in place so even through they are oriented in the correct direction, their position in XYZ space isn't the same as it was prior to the move. I know there's more to it, but I'm not sure how to write the equation to adjust one object's translation/rotation values based solely on the rotation of some other object!

Share this post


Link to post
Share on other sites
Advertisement
Hi,

This was exactly part of the problem i just solved in my thread.

http://www.gamedev.net/topic/619440-math-behind-transformed-points-and-vectors-into-localworld-space/

The last 2 posts has the solution you need.

Share this post


Link to post
Share on other sites
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!