WillieD

11-25-2005, 03:15 AM

Hi all!

I have created a matrix to rotate about an arbitrary axis. The matrix is right(I have checked it in the internet)

The problem is when i use it like this:

SetupMatrixRotateAxis(matrix, axis.x, axis.y, axis.z, angle); // where axis.x = axis.y = 1, axis.z = 0

glMultMatrix(matrix);

..

..

..

angle += 0.1;

the object seems to be rotated about 1, 1, 0 axis but also is scaled in x, y directions

Can anyone tell me what is happening?

I have created a matrix to rotate about an arbitrary axis. The matrix is right(I have checked it in the internet)

The problem is when i use it like this:

SetupMatrixRotateAxis(matrix, axis.x, axis.y, axis.z, angle); // where axis.x = axis.y = 1, axis.z = 0

glMultMatrix(matrix);

..

..

..

angle += 0.1;

the object seems to be rotated about 1, 1, 0 axis but also is scaled in x, y directions

Can anyone tell me what is happening?