Negative Translation with Camera Matrix
(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...
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.
to the viewer that looks as if he went up where really the world moves down.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement