Quaternions for mirrored animation

Started by
1 comment, last by orange_peel 18 years, 1 month ago
I have an animation system based on quaternions. Is there a simple way to mirror a quaternion around an axis (eg: the y axis so if my character faces forwards along y it will be mirrored left/right)? Obviusly the translation of each joint will have to be mirrored too.
Advertisement
You mirror through a plane, so I assume you want to mirror the rotation through the plane that has the axis in question as its normal.

To mirror the rotation, you just negate the value corresponding to the axis in question (Y axis if you're Z-up in this case), and you also negate the W value.

However, you'll probably find that you need to mirror various positions, too, unless your animations are purely angular based. Once you do that, the mesh skinned to the animation keys might start looking bad. If everything's fully symmetric, it will likely work, though.
enum Bool { True, False, FileNotFound };
Well I'm trying to mirror around a plane along the Y axis, with Z up so I guess it's the X translations and the X and Real parts of the quaternions i need to negate. I'll give it a try.

This topic is closed to new replies.

Advertisement