Jump to content
  • Advertisement

Nubber

Member
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Nubber

  • Rank
    Newbie
  1. I've got my hands on some camera code that makes a view transform, seems to work fine but its using lefthanded y-up and I need lefthanded z-up. Here is the code I have. Matrix4 rotationMatrix; m_orientation.ToRotationMatrix(rotationMatrix); // quaternion to matrix // Make the translation relative to axes rotationMatrix.Transpose(); Matrix4 tmp(-rotationMatrix); tmp(3,3) = 1.0f; Vector3 trans = m_position.GetTransformedCoord(tmp); // Make final matrix rotationMatrix(3, 0) = trans.x; rotationMatrix(3, 1) = trans.y; rotationMatrix(3, 2) = trans.z; return rotationMatrix; I thought I could just rotate the 'rotationMatrix' by 90deg around the X axis but that doesnt seem to work. I know I should figure out exactly what is going one here but until I do, does anyone know how to make view matrix I need?
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!