Jump to content
  • Advertisement
Sign in to follow this  

SharpDX Matrix.Forward curiosity

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Now I'm proficient with the practical application of matrices in rendering, but I can't say I know exactly the meaning of all the rows an columns in different transformation matrices.


I was integrating a new physics engine in my SharpDX engine and I had to port the cameras from RH to LH coordinate system. Everything seems to work correctly and rendering is also correct, with the exception of the camera view matrix forward component, which is (0, 0, -1).


Just to be sure that I did not mes sup the RH/LH conversion, I tested my old tried and true cameras with which I had no issues ever and even there the Forward component is (0, 0, -1).


So in matrix theory, shouldn't my forward components be the same sign as my forward vector? I do habe my axis properly set up in my camera:

public Vector3 XAxis = new Vector3(1, 0, 0);
public Vector3 YAxis = new Vector3(0, 1, 0);
public Vector3 ZAxis = new Vector3(0, 0, 1);

Checking the SharpDX documentation, it says that Forward return  -M31, -M32, and -M33.



Is this normal?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!