D3DXMatrixRotationY - Vector Query

Started by
0 comments, last by ubersheep 16 years, 1 month ago
Hi all, I have an object facing (float) degrees, and I'd like to move it forwards (relative to its current facing) on a flat terrain (across X and Z, Y is automatically calculated). I understand giving the facing float to D3DXMatrixRotationY() gives me a rotation matrix, but really I need a vector to multiply my object's position vector with, so I can form my object's new position. Is there some other way to form a vector describing an object's Y-axis rotation? Can anyone help me here? I've been stumped with this one for ages :( Thanks in advance,
Advertisement
I think I've got it - similar to how the camera does it - extracting m11 and m31 for x and z from this matrix rotation gives me the floats I desire :)

Thanks anyway guys :P

This topic is closed to new replies.

Advertisement