The matrix rotation params around the 2nd axis was not set correctly: Initial matrix for axis 2 (green): cos 0 sin 0 0 0 1 0 0 0 -sin 0 0 0 0 0 0 cos 1 0 After correction: cos 0 -sin 0 0 0 1 0 0 0 sin 0 cos 0 0 0 0 0 1 0
The matrix rotation params around the 2nd axis was not set correctly: Initial matrix for axis 2 (green): cos 0 sin 0 0 0 1 0 0 0 -sin 0 0 0 0 0 0 cos 1 0 After correction: cos 0 -sin 0 0 0 1 0 0 0 sin 0 cos 0 0 0 0 0 1 0