Original Post
please look at the picture:
Now in the top left screen I have a simple scene (ball and grid) and the ball moves arround some using two matrix transformations. I included a form that displays the data (top right). As you can see the ball''s world transformation is a rotate (y axis) and a translation (x,z) (it is based on sin/cos of tickcount).
I wanted to see what the whole scene looked like (inc camera). So I made a duplicate, added the camea object and made another data window (this time set up to display the camera''s world transformation matrix). Note that the ball uses the same transformation as the top one. (the view in bottom left you see now is from (3, 1, 0) so you look to the negative x axis, positive z is right)
The camera object is a simple cube with an extra line to indicate positive z axis. The camera''s world transform is the view transform of the top view, so I figured it would represent the camera''s position in 3d space. It allmost fully checks out. the camera is at (0, 0, 1) which is correct with respect to it''s transformation matrix.
But take a closer look at the camera, according to the perspective view, the camera is looking away from the ball. But in the world view the ball is visible! after some animation it becomes apparent that the view is actually consistent with a camera at position (0,0,-1)? how can this be? I have moved the camera to various other places and it doesn''t make any sense...
it there someting I am missing here? Does DX do something to the view transform matrix before it apply''s it to the geometry?
Now in the top left screen I have a simple scene (ball and grid) and the ball moves arround some using two matrix transformations. I included a form that displays the data (top right). As you can see the ball''s world transformation is a rotate (y axis) and a translation (x,z) (it is based on sin/cos of tickcount).
I wanted to see what the whole scene looked like (inc camera). So I made a duplicate, added the camea object and made another data window (this time set up to display the camera''s world transformation matrix). Note that the ball uses the same transformation as the top one. (the view in bottom left you see now is from (3, 1, 0) so you look to the negative x axis, positive z is right)
The camera object is a simple cube with an extra line to indicate positive z axis. The camera''s world transform is the view transform of the top view, so I figured it would represent the camera''s position in 3d space. It allmost fully checks out. the camera is at (0, 0, 1) which is correct with respect to it''s transformation matrix.
But take a closer look at the camera, according to the perspective view, the camera is looking away from the ball. But in the world view the ball is visible! after some animation it becomes apparent that the view is actually consistent with a camera at position (0,0,-1)? how can this be? I have moved the camera to various other places and it doesn''t make any sense...
it there someting I am missing here? Does DX do something to the view transform matrix before it apply''s it to the geometry?