Let's say that I've got a matrix with some rotation stored. Now I want to somehow make a $y$-rotation equal $0$ (or rather make it equal to the starting moment without rotation). How would I do it?
I thought about multiplying the current rotation matrix by the inverse Euler's formula for rotating around the $y$-axis, with pre-calculated angle from starting rotation quaternion of the unwanted rotation, but this is just a theoretical idea.