Converting Matrices to translations and back changes geometry in Animation Nodes I was just working on an AN function to tilt a ring of points inwards or outwards from their center. The circle is generated from the Distribute matrix node, and then Z values are added from another source.

I got it working just fine in a test file, but when I added it into a large project, the points were just rotating around the Y axis.

Further investigation showed that the problem originated in the fact that I was converting the matrices into translations before returning them to the node that called the function, and then they were being converted back into a matrix in the next node group.

Clearly, the simple answer is to keep the values stored as matrices for as long as possible, and don't be converting back and forth. However, for my own curiosity I wondered if anyone could shed any light on why this is happening at all?
A matrix represents a translation, a rotation and a scale.

When you create matrices on a circle, each will have a different translation and rotation. When you decompose the matrices and only use the translational part to create the new matrices, the rotation is lost in the process.

Instead of using the Translation Matrix node you could use the Compose Matrix node. This way you can use the rotations of the old matrices in the new ones as well.

If you just want to move every matrix a little bit, I recommend to use the Offset Matrices node instead of doing all those conversions yourself.