   direction from angles
  The should be a simple one.I've got a: a unit vector pointing -1 down Yand b: three xyz rotation angles.I want to rotate my initialized vector by the three angles, resulting in a new direction.   
Quote:Original post by travis08The should be a simple one.I've got a: a unit vector pointing -1 down Yand b: three xyz rotation angles.I want to rotate my initialized vector by the three angles, resulting in a new direction.1. Build a rotation matrix from the Euler angles2. Apply the rotation matrix to the vector (0, -1, 0)Note that if the input vector is a cardinal basis vector (which it is in your case), you can simply extract the desired direction vector directly from the matrix.Post back if you need more details.   ;  jyk, thanks for the reply.Just so I'm clear: I am building a rot matrix from the angles, after which I am simply multiplying/transforming my initialized vector by the matrix?I'm testing this and am getting something close to what I want, but not quite. Want to make sure I'm understanding correctly.;Quote:Just so I'm clear: I am building a rot matrix from the angles, after which I am simply multiplying/transforming my initialized vector by the matrix?That's correct.Quote:I'm testing this and am getting something close to what I want, but not quite. Want to make sure I'm understanding correctly.Can you describe the problems you're seeing? In what way are the results incorrect?There are a number of places that errors could be introduced (for example, missing or misplaced degree/radian conversions, using the wrong vector notation, discrepancies in Euler-angle order, etc.). If you really get stuck, you might post some code.   ;  Good point about the possible degree/radian issue. That sounds like what might be happening. I will play with this more tonight and post feedback, thanks.   ;  After a degree to radian conversion all is well. Thanks very much jyk, I really appreciate the help.Quote:Original post by jykQuote:Just so I'm clear: I am building a rot matrix from the angles, after which I am simply multiplying/transforming my initialized vector by the matrix?That's correct.Quote:I'm testing this and am getting something close to what I want, but not quite. Want to make sure I'm understanding correctly.Can you describe the problems you're seeing? In what way are the results incorrect?There are a number of places that errors could be introduced (for example, missing or misplaced degree/radian conversions, using the wrong vector notation, discrepancies in Euler-angle order, etc.). If you really get stuck, you might post some code.