Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: How to calculate aim for gluLookAt

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2005
    Posts
    22

    How to calculate aim for gluLookAt

    I want a completely free camera that can rotate on all three axes. When I press up, I want my camera to rotate up in relation to my current view. Err as in, rotate in whatever direction LOOKS like up to me at the time. Like if I was at 0, 0, 0 and looking at 0, 1, 0 with my up at 1, 0, 0 and I press up and rotate 90 degrees that way, I should be looking at 1, 0, 0 with my up at 0, -1, 0. And if I hit left I want it to rotate in whatever direction looks left to me.

    This seems pretty complicated to me. I know how to use sin, cos, tan. I don't know what arctangent is or quaternions or any of those other words I hear used on this forum. So using baby words, can anyone explain to me how to calculate what position my aim and up should be at after rotating? And if it involves complicated concepts or new trig functions could you do your best to explain them to me? In short, could you explain it like you were trying to explain it to Jack O'Neill from Stargate. If he wouldn't understand it, chances are I won't either =). Thanks in advance.

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2005
    Location
    Pakistan
    Posts
    6

    Re: How to calculate aim for gluLookAt

    hello:
    you can find the best help from "3D Computer Graphics using OpenGL by F.S.Hill Jr.".

    If still not able to resolve issue mail me on syed_qau@yahoo.ca

    take care

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •