Archived

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

JoeyBlow2

Negative Translation with Camera Matrix

Recommended Posts

(contains some pseudo code) If I want to set a camera at 0,5,0 (5 feet above the ground) why do I need to specify this? D3DXMatrixTranslation(&matrix, 0,-5,0); If I want to move the camera forward 1 foot, why do I need to do this? D3DXMatrixTranslation(&matrix, 0,0,-1); CameraMatrix = CameraMatrix * matrix; Its like everything is backwards? Am I missing something? Like an MatrixInverse function? Also MatrixInverse is kinda costly to CPU when done alot. But to me it seems DX is kinda backwards. Or am I backwards with viewport settings which is causing this? It seems when I make models, if I specify 100 feet out (0,0,100), it draws 100 feet out like its supposed to... It only seems that my camera movement and positioning is backwards...

Share this post


Link to post
Share on other sites
The view matrix is concatenated(matrix multiplication) with the world transform matrix the result shifts the world 1 down (if you''re specifying -1.0f as the _42 component of your matrix)
to the viewer that looks as if he went up where really the world moves down.

Share this post


Link to post
Share on other sites