Translate/rotate entire scene to align to coordinate system

Started by
1 comment, last by synthetix 12 years, 2 months ago
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!
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.

Hi,

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

http://www.gamedev.n...calworld-space/

The last 2 posts has the solution you need.


Thanks. I have some questions about this. I replied to the other thread.

This topic is closed to new replies.

Advertisement