Results 1 to 9 of 9

Thread: quake style camera

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Pori, Finland
    Posts
    191

    quake style camera

    could some one post a link to some tutorial about how to make a quake style camera system?

    -thanks

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    292

    Re: quake style camera

    I am setting up a tutorial for this, but I havent gotten around it yet...
    But you can download some of my code that uses it...
    http://cheo.resnet.wayne.edu/terrain.zip

    Good luck.

  3. #3
    Member Newbie
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    35

    Re: quake style camera

    I think this is quite easy isn`t it ?
    One just have to consider the direction of the vector that is defined by the cam position and some point on the 'viewing line'.
    At least if you take the xz-plane as a reference it should be easy.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Pori, Finland
    Posts
    191

    Re: quake style camera

    mancha, thanks for your camera code, but can you go upwards with it?
    I'm not sure if I put it right but I can't do that (maybe I should take a closer look at it and not just implement, I'm on a little rush now).

  5. #5
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Pori, Finland
    Posts
    191

    Re: quake style camera

    heh, I see you haven't implemented it to go upwards but I fixed that and now it works fine.

    -thanks

  6. #6
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    292

    Re: quake style camera

    No, I did not make it go upwards 'cause I have not had the need... But it should be a very simple task now that I gave you the code for going to the sides, forward and backward...



    I am glad it helped...

    [This message has been edited by mancha (edited 08-16-2002).]

  7. #7
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    292

    Re: quake style camera

    Actually, I just tested a little code...

    tempX = (Camera->m_View[1] - Camera->m_Position[1]);

    Camera->m_Position[1] += (tempX * speed);
    Camera->m_View[1] += (tempX * speed);

    Something like that should give you up or down movement depending on where your mouse is pointing...

    Or place this code in your MoveCamera function...


    /////////////////////////////////////////
    // Computing the direction of our view.
    tempX = (Camera->m_View[0] - Camera->m_Position[0])*direction; // X
    tempY = (Camera->m_View[1] - Camera->m_Position[1])*direction; // Y
    tempZ = (Camera->m_View[2] - Camera->m_Position[2])*direction; // Z


    /////////////////////////////////////////
    // Moves camera forward and backward.
    Camera->m_Position[0] += (tempX * speed); // X
    Camera->m_View[0] += (tempX * speed); // X
    Camera->m_Position[1] += (tempY * speed); // Y
    Camera->m_View[1] += (tempY * speed); // Y
    Camera->m_Position[2] += (tempZ * speed); // Z
    Camera->m_View[2] += (tempZ * speed); // Z


    [This message has been edited by mancha (edited 08-16-2002).]

  8. #8
    Junior Member Newbie
    Join Date
    Mar 2002
    Posts
    27

    Re: quake style camera

    There are some excelents tutorials for camera moving. Check out in www.gametutorials.com

    download the camera tutorials. (are 4 i think)

  9. #9
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    292

    Re: quake style camera

    I know those tutorials and I did not think their mouse implementation was too efficient...
    But I will tell you that I learned from them. So I have to give them alot of credit...

    Regards.

Similar Threads

  1. HELP: 'Descent' style camera
    By sixb0nes in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 06-23-2006, 07:33 AM
  2. Making FPS style camera movement
    By Psiborg in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-17-2006, 04:06 AM
  3. Maya style camera
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-02-2006, 07:30 PM
  4. C++ Style or C Style? Error on compiling...
    By DarkBrute in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-23-2005, 02:14 AM
  5. spaceship- or aircraft-style camera
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-08-2001, 02:24 PM

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