Archived

This topic is now archived and is closed to further replies.

mickey

rendering the flattened mesh to the right side using D3DXMatrixShadow(...)

Recommended Posts

hi, i'm having trouble, anyway this is what i do to flatten the mesh unto the floor, D3DXVECTOR4 LightPosition( 0.0f, 3.0f, 0.0f, 1.0f); D3DXMATRIX ShadowMatrix; D3DXPLANE ShadowPlane(0.0f, 1.0f, 0.0f, 0.0f); D3DXMatrixShadow(&ShadowMatrix, &LightPosition, &ShadowPlane); matObjWorld *= ShadowMatrix; ... can you plz show me the way how to project the flatten mesh to the right/left side instead? many thanks, [edited by - mickey on November 5, 2002 8:10:01 AM]

Share this post


Link to post
Share on other sites
not sure if this is right...

a shadow plane (or any plane) can/is defined with a normal. so to have a normal "ground" plane u use a normal (0.0,1.0,0.0) y-axis is pointing up. to change this to wall on the right side, i''d say use something like (-1.0,0.0,0.0) x-axis is pointing to the left.

right?

Share this post


Link to post
Share on other sites