Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualAshaman73

Posted 13 February 2013 - 07:35 AM

Hmm..

the tempView matrix you construct in the CreateViewProjection method is the world orientation matrix of the camera, but you need to convert the world space into view space. Therefor invert the camera matrix to get the view matrix. The final transformation should look like

 

final_position = Proj * inv(Camera) * Model * position

 

I think that the transpose is not necessary either (transpose is often used to invert the rotation matrix part of an orthogonal matrix, but you need to take care about the position and scaling too).


#2Ashaman73

Posted 13 February 2013 - 07:34 AM

Hmm..

the tempView matrix you construct in the CreateViewProjection method is the world orientation matrix of the camera, but you need to convert the world space into view space. Therefor invert the camera matrix to get the view matrix. The final transformation should look like

 

final_position = Proj * inv(Camera) * Model * position

 

I think that the transpose it not necessary either (transpose is often used to invert the rotation matrix part of an orthogonal matrix, but you need to take care about the position and scaling).


#1Ashaman73

Posted 13 February 2013 - 07:33 AM

Hmm..

the tempView matrix you construct in the CreateViewProjection method is the world orientation matrix of the camera, but you need convert the world into view space. Therefor invert the camera matrix to get the view matrix. The final transformation should look like

 

final_position = Proj * inv(Camera) * Model * position

 

I think that the transpose it not necessary either (transpose is often used to invert the rotation matrix part of an orthogonal matrix, but you need to take care about the position and scaling).


PARTNERS