When i draw the vector, it´s rotating. but it´s not rotating like the object i draw. the object is rotating around his own axis. the vector is rotating around the normal axis. But it´s the same transformation-matrix. what am i doing wrong?
No, thats not the problem. My matrix-model is correct. It is rotating correct, exept the point that my model is rotating around his own axis and my vector not with the same transformation-matrix. ???
There has to be something very strange in my code!
Since you are dropping the final column of the matrix (i.e. not including it in the transformation) you are eliminating the translation transformation.
If you add vec.w*matrix[3,7,11,15] to each line of the matrix multiplication and then a C.w=… line, I think you may solve your problem.
Or it may do nothing it all, I might be misinterpreting your issue.