Results 1 to 3 of 3

Thread: gluLooakAt....

  1. #1
    Member Contributor
    Join Date
    Nov 2002
    Location
    Torun/Poland
    Posts
    58

    gluLooakAt....

    Hi,
    I hace two matrices - normal and inverted for each
    object in scene.
    suppose I have camera attached to an object.
    How to make camera reflect objects rotations.
    Currently I do it like that:
    gluLookAt(matrix[12] +distance,matrix[13],matrix[14]
    matrix[12], matrix[13], matrix[14]
    matrix[4], matrix[5], matrix[6]);
    but it works only for rotation around X axis
    Please give me a hint.
    .

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Nov 2002
    Location
    Latvia
    Posts
    626

    Re: gluLooakAt....

    If I got it right (you want to add some sort of 3rd person camera) then all you need is glLoadIdentity(); before drawing the model + some stuff to remove feeling that everything rotates about cameras axis.

  3. #3
    Member Contributor
    Join Date
    Nov 2002
    Location
    Torun/Poland
    Posts
    58

    Re: gluLooakAt....

    No, I want to add 1st person camera to an airplane.
    The idea I've found, but not yet implemented relating to spherical coordinations of a point seems not very elegant.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean