Log in

View Full Version : Substract 3D Matrixes or compensate parent's rotation?



sergiozambrano
08-09-2012, 12:37 AM
I've copy/pasted JS code from here and there and managed to build a html element rotator which works great so far.

It works fine so far, and I understand how the 3D matrix works, but no matter how much I tried, though, I can't get to successfully calculate / intersect / substract a matrix against it's parent matrix.

I need to make a function that compensates an element's parent rotation so the children can face the camera (different than just removing its 3D attributes, which would make a flat face on the parent's element)
A sort of element stabilization (not stabilizating speeding motion, but position) or a way to "subtract" or "cancel" the parent's rotation, so the children stays "apparently" not-rotated.

You can see it here
http://socialblogsitewebdesign.com/css-3d-group/
(for webkit browsers)

Can anyone help me with a function to "subtract" those matrices?
It could either consider all the elements up to the first un-rotated element, or just the parent, since the element to stabilize only has one rotated parent.

Thanks.