I have an error somewhere in my code, it was interesting if this is not true.
I have a 2D matrix in my code, but to display my world on the screen, I need to convert the 2D viewing matrix to three-dimensional. This is the process I'm using:
| abc | | abc 0 | | def | => | def 0 | | ghi | | ghi 0 | | 0 0 0 1 |
This works when I use the identity matrix for a 2D matrix, but as soon as I apply any transformations to the 2D matrix, all of my objects that are drawn disappear.
For drawing in 2D using 3D, I use this projection matrix:
_basicEffect.Projection = Matrix.CreateOrthographicOffCenter(0, graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height, 0, 0, 1);
What is the correct way to convert a 2D matrix to 3D?
c # matrix xna linear-algebra transformation
Soap
source share