Thread: 3D Math translations

  1. #1
    Registered User
    Join Date
    Nov 2001

    3D Math translations

    Hi, I am really stuck on 3D math, and I am making a flight sim game in OpenGL, and I realized I don't know how to code the movement of the plane. For instance: when i turn the plane upwards how would I calculate the path it would travel on? I know rotation on the y axis, but a can't figure it out on the x axis(the problem above). I would appreciate any help, this is making my head hurt :-). Thanks!

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    i'm not sure exactly what your asking... maybe try this it explains matrices, matrix rotations, translations, ect...
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  3. #3
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    I can help you out are going to need to be able to rotate on all three axises for a good flight sim. I wouldn't normally do this, but hey, you're in need, I won't make you find it yourself, I'll tell you what you need to do. I'm going to use X, Y, and Z for everything, but the part to the left of = is the new coordinate, where you will display something, and on the right is the original coordinates, except where it is associated with the trig function, that's the angle rotated over that axis...on with it!

    x=x(cos y * cos z)+y(cos y * sin z) + z(-sin y);

    y=x((sin x * sin y * cos z)-(cos x * sin z)) + y((sin x * sin y * sin z) + z(sin x * cos y);

    z=x((cos x * sin y * cos z) + (sin x * sin z)) + y((cos x * sin y * sin z) - (sin x * cos z)) + z(cos x * cos y);

    hope that doesn't do translations, but you should be able to code those easily enough...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Looking for a 3d math backup book.
    By indigo0086 in forum Game Programming
    Replies: 2
    Last Post: 06-21-2008, 08:02 PM
  2. 3d math questions
    By linuxdude in forum Game Programming
    Replies: 3
    Last Post: 01-04-2005, 09:07 PM
  3. 3d math tutorials up
    By confuted in forum Game Programming
    Replies: 35
    Last Post: 09-03-2003, 06:51 AM
  4. Min Math level req for 3d graphics?
    By EvBladeRunnervE in forum Game Programming
    Replies: 12
    Last Post: 02-24-2003, 09:32 PM