Sign in to follow this  
Harryu

Billboarding problems

Recommended Posts

Harryu    174
This is how I set up my matrices for drawing my 2D billboarded particles: D3DXMatrixScaling(&matScale, scale, scale, scale); D3DXMatrixTranslation(&matTrans, XPos, YPos, ZPos); // Billboard matrix m_Graphics->GetDeviceCOM()->GetTransform(D3DTS_VIEW, &matView); D3DXMatrixTranspose(&matTransposed, &matView); D3DXMatrixMultiply(&matWorld, &matScale, &matTransposed); D3DXMatrixMultiply(&matWorld, &matScale, &matTrans); m_Graphics->GetDeviceCOM()->SetTransform(D3DTS_WORLD, &matWorld); m_Graphics->GetDeviceCOM()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); The problem is, I can see the particles (2D) fine from front on, but when I go to the side or the back they disappear (and when I am halfway in between they look thinner). In other words, they are not rotating to face the viewpoint, thus they look 2D. I thought this was what D3DXMatrixTranspose was meant to do. I know I have probably missed out an important step, so some help would be nice.

Share this post


Link to post
Share on other sites
Harryu    174
Unfortunately, when I do that, I just get a large polygon covering most of the screen.

That's probably one of the problems I had, but now how do I get rid of this weird polygon, and get my particles showing?

[Edited by - Harryu on October 8, 2005 12:27:47 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this