Particle rotation

Started by
1 comment, last by fitfool 17 years ago
Ok i have recently created a particle engine fora smoke trail of a rocket and am now working on 'billboarding' the particles. i understand that im supposed to rotate each partcile by the opposite view matrix. so far i have done

WorldMatrix.SetRotateX( -Camera->GetViewPoint()._12 );
WorldMatrix.SetRotateY( -Camera->GetViewPoint()._22 );

then muiltiplying it in with everything else like

D3DDevice->SetTransform( D3DTS_WORLD, &(WorldMatrix.RotateX * WorldMatrix.RotateY * WorldMatrix.RotateZ * Particles[Count].WorldMatrix.Translate));

But its not always making the particles face the camera. Anyone Know how to do this? thanks, FitFool
Advertisement
Take a look at this article to help you out here:

http://www.mvps.org/directx/articles/view_oriented_billboards.htm

ByronBoxes
Perfect, thanks.

This topic is closed to new replies.

Advertisement