4
\$\begingroup\$

I have a top down 3D camera:

view = Matrix.CreateLookAt(new Vector3(0,0,20), Vector3.Zero, Vector3.Up);

Now I want to achieve the effect like when I zoom in the scene and only show a section at the middle of my actual scene. When I now move an object via CreateTranslation it looks more like moving an object in 2D.

What I have now is:

What I want is more like this:

\$\endgroup\$
5
\$\begingroup\$

What I think you want is an orthographic projection instead of a perspective one. Matrix.CreateOrthographic is what you should use.

You may have to do some additional rotation on the orthographic matrix to have it look down instead of forwards, but that's as easy as multiplying the view matrix by a 90 degree rotation matrix on the X axis.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.