• ### What is your GameDev Story?

#### Archived

This topic is now archived and is closed to further replies.

This topic is 5398 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi. I have a 4x4 Matrix (Left-handed, D3D) from which I need a position vector and a heading vector. The Position (x,y,z) = Matrix._41, Matrix._42, Matrix._43 But how do I calculate a heading vector?

##### Share on other sites
I suppose this is the solution (I am not sure):

The 4x4 matrix is a 3x3 matrix + some movement information in the 4th colum.
The 3x3 matrix contains the new coordinates of the x-axis, the y-axis and the z-axis. I suppose your heading vector is equal to the z-axis of the new coordinate system, wich you can find in the 3x3 matrix.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634134
• Total Posts
3015751
×