Jump to content
  • Advertisement

Rapsey

Member
  • Content Count

    84
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Rapsey

  • Rank
    Member
  1. Rapsey

    Need accurate time stepping

    Well I also needed a high precision timer, did some googling and settled to using the glfw library. Since there were a number of issues with using QueryPerformanceCounter. GLFW is an open source library for doing graphics programming. Im not sure exactly how good their timer code is, but its probably quite good since GLFW is a well respected peace of code.
  2. Rapsey

    Need accurate time stepping

    You need a high precision counter. Checkout the win32 API function: QueryPerformanceCounter
  3. Rapsey

    yaw+pitch = roll?

    Yes there is a Matrix.RotationYawPitchRoll replacing the quaternion with it does not make any change. matPos.Translate( 0.0f, 0.0f, -500.0f ); Switching the parameters in Matrix.Multiply does not help.
  4. Rapsey

    yaw+pitch = roll?

    Nope. This is c# and managed directx. Vector3 is a value type (struct) all that new Vector3 does is set x,y,z to 0.
  5. Rapsey

    yaw+pitch = roll?

    Oh sorry, I guess I did not explain my problem properly. I know yaw+pitch != roll. What I want to know is, why the above code rotates the camera about the Z axis. Even though roll is always 0. If yaw and pitch are both above 0 (lookAt.X and lookAt.Y) the camera rotates about the all 3 axes. Can someone please explain to me, why that is happening?
  6. Rapsey

    yaw+pitch = roll?

    I dont understand why the camera rotates around the Z axis, when both lookAt.X and lookAt.Y are > 0: pos is the change in position, lookAt represents the angles we're rotating by. Matrix matT, matR; Quaternion qR; matT = Matrix.Translation( pos ); matPos = Matrix.Multiply( matT, matPos ); qR = Quaternion.RotationYawPitchRoll( lookAt.X, lookAt.Y, 0 ); matR = Matrix.RotationQuaternion( qR ); matPos = Matrix.Multiply( matR, matPos ); device.Transform.View = Matrix.Invert( matPos ); pos = lookAt = new Vector3();
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!