Jump to content
  • Advertisement
Sign in to follow this  
Alundra

Mirror bone in local space

This topic is 2126 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,

Mirroring a skeleton in world space is simply a question of :

1 - Search the bone and it's mirror bone.

2 - Inverse the x of the translation for both.

3 - Inverse the x and w of the quaternion for both.

That works because it's in world space so the plane is always on the YZ axis.

The real problem comes to mirror a skeleton in local space because the plane is not always YZ axis.

Do you have an efficient way to have a result in local space ( bone relative to its parent ) ?

Thanks

Share this post


Link to post
Share on other sites
Advertisement

If both parent and child bone are mirrored, then the bone relative to its parent will be the same as the mirrored version.

 

If not, just use the inverse transform of the parent joint multiplied by the child joint position to get the local space transform.

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!