Can I add two matrix's rotation angle to transform a vector?
-
- Posts: 7
- Joined: Tue May 31, 2016 9:01 am
Can I add two matrix's rotation angle to transform a vector?
There are two matrix, matrixA(rotation(X1, Y1, Z1)), matrixB(rotation(X2, Y2, Z2)), and matrixC setRotationAngle((X1 + X2, Y1 + Y2, Z1 + Z2)), then finally matrixC.transformVector(VectorV) to get a vector rotation result? Suppose matrixA and matrixB have same translation and scale primitives, so does matrixC. I did like that, but the result seems incorrect. Thanks.
Re: Can I add two matrix's rotation angle to transform a vec
No, you most probably want to apply rotation B after rotation A.... so multiply the matrices together
-
- Posts: 7
- Joined: Tue May 31, 2016 9:01 am
Re: Can I add two matrix's rotation angle to transform a vec
Yeah, that's exactly what I want, thanks dude, I'll try it tomorrow.devsh wrote:No, you most probably want to apply rotation B after rotation A.... so multiply the matrices together
-
- Posts: 7
- Joined: Tue May 31, 2016 9:01 am
Re: Can I add two matrix's rotation angle to transform a vec
That works perfect thank youdevsh wrote:No, you most probably want to apply rotation B after rotation A.... so multiply the matrices together