title: My object won't rotate and scale in the same time
body: <p>I'm working to get my objects to rotate on my terrain.  Now here is my problem, I can rotate my object but not scale them or scale but not rotate.  It depends on which of my line of code goes last.  For example, If rotation code goes last it will rotate but not scale.    </p>
  
  <p>Here is my code  </p>
  
  <pre><code>D3DXMatrixMultiply(&amp;currentFrame-&gt;exCombinedTransformationMatrix, &amp;currentFrame-&gt;TransformationMatrix, parentMatrix);
  D3DXMatrixScaling(&amp;currentFrame-&gt;exCombinedTransformationMatrix, trans.Sx, trans.Sy, trans.Sz);
  D3DXMatrixRotationX(&amp;currentFrame-&gt;exCombinedTransformationMatrix, D3DXToRadian(trans.Rx));
  </code></pre>
  
  <p>One of my buddies, Said that I'm overwriting the matrix.  </p>
  
  <p>So I tried this</p>
  
  <pre><code>D3DXMatrixMultiply(&amp;currentFrame-&gt;exCombinedTransformationMatrix, &amp;currentFrame-&gt;TransformationMatrix, parentMatrix);
  D3DXMATRIX w;
  D3DXMATRIX s;
  D3DXMatrixScaling(&amp;s, trans.Sx, trans.Sy, trans.Sz);
  D3DXMatrixRotationX(&amp;w, D3DXToRadian(trans.Rx));
  D3DXMatrixMultiply(&amp;currentFrame-&gt;exCombinedTransformationMatrix, &amp;s, &amp;w);
  </code></pre>
  
  <p>The result of the code above is now it will only scale no matter what.</p>