   D3DXMatrixShadow
  hello,ive been working a bit with this function but i get some strange results. I have a mesh with a world matrix::D3DXMATRIX scale;float scal = 0.05f;D3DXMatrixScaling(&scale, scal, scal, scal);D3DXMatrixTranslation(&mTeapotWorld, 0.0f, 6.0f, -6.0f);scale = scale * mTeapotWorld;mTeapotWorld = scale;and now i compute the shadow matrix::static D3DXVECTOR4 lightDirection(0.577f, -0.577f, 0.577f, 0.0f);D3DXPLANE groundPlane(0, -1, 0, 0.0f);D3DXMATRIX S;D3DXMatrixShadow(&S, &lightDirection, &groundPlane);D3DXMATRIX eps;D3DXMatrixTranslation(&eps, 0.0f, 0.001f, 0.0f);D3DXMATRIX oldTeapotWorld = mTeapotWorld;mTeapotWorld = mTeapotWorld * S * eps;ok now mTeapotWorld should be the matrix, and with this i want to draw the shadow. The problem is the shadow does not start from the mesh it actually starts somewhere at 3/0/0. And thats not very good because if the mesh is at 0/6/-6 the shadow is by far too low and also the x/z components are not really acceptable. The funny thing is, if i use a Teapot matrix with the translation vector 0,0,-6 everything works perfect, the problem is if i move the mesh the shadow does not move it is always on the same plane.Any idea how to solve this problem?thx   
Quote:Original post by of_ownagethe problem is if i move the mesh the shadow does not move it is always on the same plane.This is what the shadow matrix is supposed to do: cast the object as a shadow onto the plane of your choice. If you move the object away from the plane, the shadow will move on the plane, and be distant from the object. If this is the behaviour you're seeing, then everything is working as it should.