Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

RotoMuffin

World to Local - Addchild??

This topic is 6929 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 need to get some objects into a parent-child tree so that the position doesn''t appear to move when added to the bottom of the tree, ie. from world to parent relative space. The verices are in local space, but all the original transforms are in world space. I can get a transform relative to the parent by multiplying the transform matrix, which is the composite of the object''s transform, rotate and scale, by the inverse of the composite of all of the ancestor''s matrices, but I need to use the individual transform, rotate and scale values later on and decomposing the changed matrix back into transform, rotate and scale is a pain in the ass, if not impossible. Any thoughts on how to build an "AddChild" routine and maintain individual transform, rotate and scale values? I knew I should have paid attention in linear algebra... -thanks

Share this post


Link to post
Share on other sites
Advertisement
Nevermind. I''ve been working on this for months and I got frustrated enough to post about it and while waiting for replies I tried one last time at recursively applying the inverse transforms down the tree for each parent and *hooray!* everything works now.

My motion captured dancing ninja death robot is alive! Oh, joy!

Share this post


Link to post
Share on other sites

  • 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!