Greeting everyone, allow me to explain my simple problem.
I'm trying to set up a skybox class, but I'm doing it slightly differently.
I just want to have 6 quads on which I'm displaying textures (bear with me, I'm just experimenting).
Coming from OpenGL, I thought I could do this through some matrix manipulation, creating my quads (using vertex buffers) and then do something like this in the effect.
Matrix noTranslation = MainCamera.Instance.ViewMatrix;
noTranslation.M14 = 0;
noTranslation.M24 = 0;
noTranslation.M34 = 0;
basicEffect.World = Matrix.Identity;
basicEffect.View = noTranslation;
basicEffect.Projection = MainCamera.Instance.projectionMatrix ;
This should remove any translation from the quads.
To my surprise, the quads translate normally in world space.
It appears that the basic effect doesn't like being cheated on the matrices...
Any idea why this is happening?
Ok, I'm an idiot.
I was defining my vertices with the Z at 0, which means they were always "inside" the camera if you know what I mean.
By changing the Z value to -1 or 1, I can rotate and see my quad in place and it does not translate.
All sorted, it was me all along (of course).