Is there a bug in Matrix.CreateShadow, or am I doing something wrong?
Vector3 shadowLightDir = new Vector3(0.0f, 1000.0f, 0.0f);
Plane lightPlane = new Plane(Vector3.Up, -1);
Matrix Shadow = Matrix.CreateShadow(shadowLightDir, lightPlane);
I use the above code in my DrawModelShadows method, to draw Planar shadows for my models... And it works... but ...
The problem is this... the shadow is directly below the model (which is what I want), but when I move the camera around, the shadow moves from directly under the model (just slightly) in favour of the camera position (towards the camera). The model is drawn in the correct position but its shadow will now be slightly offset. I don't understand why this happens or how to fix it.
Any ideas?