   Getting the rotation from a world matrix?
  heyhow do you get the x y z rotations from a world matrix?thanks ;P   
  For which Api, DirectX or OGL. For DirectX the First three Rows are the rotation and the final row is your Translation.Example:M._11,M._21,M.31 will give you the x,y,z rotation for the Axis Pointing on the right.M._12,M._22,M.32 will give you the x,y,z rotation for the Axis Pointing Up.M._13,M._23,M.33 will give you the x,y,z rotation for the Axis Pointing Into the Screen.   ;  thanks for the reply...but.. that seems to only return the unit vector...   ;  Since there are Direction and nothing more that is why they are normalized and that is why you get them in the range of 0 to 1. By the way what are you trying to do. Just let me know and i can see if i can help   ;  I think the OP wants Euler angles rather than basis vectors. @The OP: If DirectX doesn't have a function for extracting Euler angles from a matrix, you may have to write one yourself.   ;  If you take a look at this  MSDN page, you can see how the world matrix is formed. You can't pull the angles directly out of the world matrix. One way to do it is to store the rotational values separately. See if this tutorial helps out any.   ;  thanks for the info...let me explain a bit..class Position{  D3DXVECTOR3 _rot, _pos, _scale;  D3DXMATRIX  _posMat, _rotMat, _scaleMat, _attachMat, _worldMat;  // various function to operate on the vectors.. }when you attach a matrix it allows you to stick one position on to another.....  _rot, _pos, _scale ..  do not keep the _attachMat values.. so when a Position is attached to another the only way to get the relative rotation is to get it from the _worldMat...  for my current situation i really only need the rotation around the Y axis..  I followed the link to the MSDN ... I know how to calculate the the rotations going in but i am not sure how to extract them you set the rotations using sin and cos how do you undo sin and cos??   