   projection matrix, keeping objects same size
  When my window is resized, I update the projection matrix like so:D3DXMatrixPerspectiveFovLH(&matrixProjection,D3DX_PI/4.0f,viewWidth/viewHeight,clipNear,clipFar);and then set it. As expected, it will make my objects always have the same width to height ratio. When the width of the window is changed the objects stay the same size and when the height is changed they shrink. However, what I really want is objects to be the same size no matter what the window size is(since this is for a map editor). The only idea I've come up with is to modify the camera position to zoom in, but there hasto be a better way than that. Is there a value I can multiply my aspect ratio to get this to work?[edit] & disappeared for some reason...[edited by - Raloth on July 30, 2003 11:25:33 PM]
  the FOV can make it appear to zoom, the smaller the FOV, the higher the ''power'' of magnification. ;  Hmm I never realized that. Anyway, that still doesn''t solve my problem. What I need is a way to eliminate the scaling of objects when you adjust the window''s height. ;  You''re re-adjusting the aspect ratio every time the view''s updated. Taken from the sdk docs:w  0  000  h  000  0  zf/(zf-zn) 10  0  -zn*zf/(zf-zn)  0where:h is the view space height. It is calculated from h = cot(fovY/2);w is the view space width. It is calculated fromw = h / Aspect.  As you can see, "w" depends on the aspect. When the aspect changes, the "x" coordinate of the vertices  of objects will be affected.How your object size doesn''t change when the window width is changed, I don''t know.   Peace,Muhammad Haggag ;  Mathematically there's no way to do what you want.  Your view frustum is going to have a vertical FOV and a horizontal FOV.  A projection matrix generator can strive to keep one or the other constant, but not both if the window is allowed to have any aspect ratio.  I mean, you could keep both FOVs the same which is actually very easy -- don't change the projection when the window changes.  But then objects will appear scaled along one axis or the other -- probably not what you want.The D3DX functions take a vertical FOV.  That's common and IMO more intuitive than horizontal FOV because it keeps things the same as the window is elongated horizontally and human beings tend to be interested in things that exist on a more-or-less horizontal plane.If I understand you correctly, maybe you want to try it the other way: keeping a fixed horizontal FOV.  If so, take your horizontal FOV and divide it by the aspect ratio (or is it multiply?) and pass that in as the vertical FOV.   [edited by - Donavon Keithley on July 31, 2003 3:06:04 AM]; While digging around in the msdn I found this:D3DXMatrixPerspectiveLHInstead of taking a FOV and an aspect ratio it takes the width and height of the view volume. I just gave it my new window coordinates (divided by the screen resolution) and everything works fine now =). ;  Sounds like I misunderstood what you were after.  Glad you figured it out. 