Original Post
I'm making a game where I have a couple hundred trees made from 2d quads. I tried to billboard them with this code, but they seem to get stretched out really high and really messed up.
m_pD3DDevice->GetTransform(D3DTS_VIEW,&view_matrix);
D3DXMatrixTranslation(&location_matrix,x,y,z);
D3DXMatrixTranspose(&trans_matrix,&view_matrix);
world_matrix=trans_matrix;
//Now we plug in the location values into our world matrix.
world_matrix._41 = location_matrix._41;
world_matrix._42 = location_matrix._42;
world_matrix._43 = location_matrix._43;
m_pD3DDevice->SetTransform(D3DTS_WORLD,&world_matrix);
Whats wrong with this code?
thanks
/\/\att
[edited by - mattcarpenter on July 31, 2002 12:23:10 AM]