Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

sdoherty55

Sin wave movement: Pleae Help!!

This topic is 5857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The code section at the bottom of the post works fine with: m_fRoll = m_fRoll + 1.1f; [or] m_fYaw = m_fYaw + 1.1f; but fails with: m_fRoll = m_fRoll + 1.1f; [and] m_fYaw = m_fYaw + 1.1f; Why is my Sky Box / Sphere moving from left to right in a formatation of a Sin Wave? It should be moveing diagonal? I am totally lost, please help?
  
D3DXMatrixTranslation(&m_matWorld, m_vPosition.x, m_vPosition.y, m_vPosition.z);

D3DXMatrixRotationX( &mRotateX, -m_vRotate.x );  // Yaw

D3DXMatrixRotationY( &mRotateY, -m_vRotate.y );  // Pitch

D3DXMatrixRotationZ( &mRotateZ, -m_vRotate.z );  // Roll


D3DXMatrixMultiply( &mTemp, &mRotateX, &mRotateY );
D3DXMatrixMultiply( &mTemp, &mTemp, &mRotateZ );

D3DXMatrixMultiply( &m_matWorld, &mTemp, &m_matWorld ); 
  

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!