Why are my objects so slope?
Hi,
I''m rendering a cube in my project, I''m just playing around with 3d. the problem is that, when looking at the cube from the front side, before moving the camera etc (I actually move my camera little bit on the Z axis to see the cube, cause it''s origin is 0,0,0 as well as the camera''s. That the only thing I do with my camera, I translate it. My perspective matrix code is from the SDK tutorial (...PerspectiveLH(DX_PI/4, 1.0f, 1.0f, ..), my object is really ok (i guess), I don''t transform the cube itself in any way (it''s set to identity). Now the problem is that the top of the cube is sloppy, I mean the top edge from the front view, while the rest of the cube is ok (the edge is a little bit lower on the left side than it is on the right side). This persists even if I transform my cube (rotate it), the part of the cube in the top-left part of the screen "shrinks" somehow. Any idea?
It's probably your aspect ratio.
It should look like this:
D3DXMatrixPerspectiveFovLH(&matrix, D3DX_PI/3, (screenwidth/screenheight), near clip plane, far clip plane);
Edit: I messed up.
[edited by - Fald on December 5, 2003 8:36:04 PM]
It should look like this:
D3DXMatrixPerspectiveFovLH(&matrix, D3DX_PI/3, (screenwidth/screenheight), near clip plane, far clip plane);
Edit: I messed up.
[edited by - Fald on December 5, 2003 8:36:04 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement