• Create Account

### #Actualthecheeselover

Posted 07 October 2012 - 08:00 AM

Hi

I've been coding my own math library and I got a bug when I create a Matrix from a rotation across the X, Y and Z axises. The bug is that it also scales my vectors. I know it might be hard to understand my code, but you are my only hope left (I checked and checked again my code a lot of times) so here's my code:

static Matrix4x4<T> CreateFromRotationXYZ_S(const T &radiansX, const T &radiansY, const T &radiansZ)
{
Matrix4x4<T> result;
result.m14 = 0;
result.m24 = 0;
result.m34 = 0;
result.m41 = 0;
result.m42 = 0;
result.m43 = 0;
result.m44 = 1;
return result;
}


Thank you

### #1thecheeselover

Posted 06 October 2012 - 08:00 PM

Hi

I've been coding my own math library and I got a bug when I create a Matrix from a rotation across the X, Y and Z axises. The bug is that it also scales my vectors. I know it might be hard to understand my code, but you are my only hope left (I checked and checked again my code a lot of times) so here's my code:

static Matrix4x4<T> CreateFromRotationXYZ_S(const T &radiansX, const T &radiansY, const T &radiansZ)
{
Matrix4x4<T> result;
result.m14 = 0;
result.m24 = 0;