Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualAressera

Posted 16 March 2013 - 01:38 PM

First of all, your camera matrix's up, left, and look vectors should be the columns, not the rows. That's probably one issue you might be having.

The main issue is that the direction of the matrix's transformation is different for objects and cameras. For objects, the matrix should transform points from object to world space. For cameras, the 'camera object matrix' transforms from camera space to world space, while what you want is the inverse camera matrix, the view matrix which transforms from world to camera space.

You will find that the camera's object matrix, not the view matrix will be the identity matrix when there is no rotation. If you respect the transformation directions and make sure that you are using right-handed coordinates to compute your viewing directions, you shouldn't have any inconsistencies.

In my engine, the camera's look vector is indeed the negation of the camera's object matrix's 3rd column.

#3Aressera

Posted 16 March 2013 - 01:38 PM

First of all, your camera matrix's up, left, and look vectors should be the columns, not the rows. That's probably one issue you might be having.

The main issue is that the direction of the matrix's transformation is different for objects and cameras. For objects, the matrix should transform points from object to world space. For cameras, the 'camera object matrix' transforms from camera space to world space, while what you want is the inverse camera matrix, the view matrix which transforms from world to camera space.

You will find that the camera's object matrix, not the view matrix will be the identity matrix when there is no rotation. If you respect the transformation directions and make sure that you are using right-handed coordinates to compute your viewing directions, you shouldn't have any inconsistencies.

In my engine, the camera's look vector is indeed the negation of the camera's object matrix's 3rd column.

#2Aressera

Posted 16 March 2013 - 01:38 PM

First of all, your camera matrix's up, left, and look vectors should be the columns, not the rows. That's probably one issue you might be having.

The main issue is that the direction of the matrix's transformation is different for objects and cameras. For objects, the matrix should transform points from object to world space. For cameras, the 'camera object matrix' transforms from camera space to world space, while what you want is the inverse camera matrix, the view matrix which transforms from world to camera space.

You will find that the camera's object matrix, not the view matrix will be the identity matrix when there is no rotation. If you respect the transformation directions and make sure that you are using right-handed coordinates to compute your viewing directions, you shouldn't have any inconsistencies.

In my engine, the camera's look vector is indeed the negation of the camera's object matrix's 3rd column.

#1Aressera

Posted 16 March 2013 - 01:35 PM

First of all, your camera matrix's up, left, and look vectors should be the columns, not the rows. That's probably one issue you might be having.

 

The main issue is that the direction of the matrix's transformation is different for objects and cameras. For objects, the matrix should transform points from object to world space. For cameras, the 'camera object matrix' transforms from camera space to world space, while what you want is the inverse camera matrix, the view matrix which transforms from world to camera space.

 

You will find that the camera's object matrix, not the view matrix will be the identity matrix when there is no rotation. If you respect the transformation directions and make sure that you are using right-handed coordinates to compute your viewing directions, you shouldn't have any inconsistencies.


PARTNERS