   Matrix multiplication madness (particle strech in the direction of its velocity)
  Hello, I'm having problems getting the right effect from combining some matrices.I'm using DirectX matrices, which are row major.I'm working on particle systems, so all particles must be facing the camera. I fix this by rotating the particles by the inverse view matrix (I zero out the translation components). I also scale the particles and rotate them on the axis which points directly out of the camera to get some simple rotation effects. Obviously I also use a position matrix to move them around.Now consider that I use these particles to generate smoke when you shoot something.I've added an additonal effect: the smoke moves away from the collision point in the direction of the surface normal the bullet hit, so it moves away from the surface.Now I want to scale the particles in the direction they move (in the direction that their velocity points to). But I can't get this to work, the particles get rotated incorectly no matter how I change the matrix multiplication order or other stuff, so sometimes they don't appear at all or rotate stupidly when I move the camera. I have no idea what else to try, so here is how I do it so far:resultMatrix=inverseCameraViewMatrixWithoutTranslation*simpleRotationOnTheAxisTheCameraPointsTo*simpleParticleScaling*position;Note: the resultMatrix gets multipled by the view*Projection matrix just before it is drawn.The thing written above works, now I want to add the particle stretch effect.So I have a velocity dir vector(normalized): velDirSo I make a scaling matrix from it: velDirScaleSo, where should I put this in the equation that produces resultMatrix? Should I transform the velDir vector by cameraView matrix (or its inverse) before making a scale matrix from it?? I've tried so many combinations that I have no idea what else to try (I'm no expert on matrices, I'm still in middle school in my country and I start studying next year, so no matrix algebra so far...)Anyone tried something like this before?   
  I've got it working now, I didn't change this part at all, instead I fixed it with a simple dot product multiplication with velocity vector in the vertex shader.   