Jump to content
  • Advertisement
Sign in to follow this  
whereisumar

Transformation is MESSED

This topic is 4346 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've built a pretty decent ASE Loader. Everything is rendering fine...except this: When I load an object which has BOTH translation Keys AND rotation keys the transformation messes up. Not by much, but for instance, the translation might over do itself just a little, but noticibly. What am I doing wrong? Below is the code from the method that updates the 'GeomObject' Matrix. //This is In the TRANSLATION section. M.M41 += Pos.X; M.M42 += Pos.Y; M.M43 += Pos.Z; //This is in the ROTATION section. Vector3 TempPos = new Vector3(M.M41, M.M42, M.M43); M = M * Matrix.Translation(-1 * NodeTM.Pos - TempPos); M = M * Matrix.RotationAxis(Rot, this.Angle); M = M * Matrix.Translation(NodeTM.Pos + TempPos); PS I have tried to reverse the order (i.e. do the rotation transformation first on every render iteration. Seperately, the rotate and translate are working 100% accurately.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!