Thread: Question about view vector, position, and matrix speed

  1. #1
    Banned
    Join Date
    Jan 2003
    Posts
    1,708

    Question about view vector, position, and matrix speed

    I'm trying to make my own camera class, and I'm trying to get an idea of how gametutorials made theirs. when i was looking through theirs i found that whenever you strafe you not only add the strafe vector multiplied by speed to the position, you also add this to the current view vector of the camera. When you move forward or backwards you must first subtract the position vector (i know it isn't really a vector, but it seems standard to use a vector as a point class too) from the view vector and then do the same. Why is it done that way? I thought the position vector and view vectors could be maniuplated completely independant for each other. I thought the glu lookat function took care of all of that behind the scenes for you. Well anyway I don't know why it's done that way and I don't want to write anything that i don't understand.
    EDIT: in the strafe movement it's only the x and z compontents which are modified, in the forward/backward movement all components are modified.

    About the matrices: when they do the rotations with the mouse, I noticed they don't use opengl matrices. Would it be faster to do so? There's quite a bit of multiplication involved, and it takes every scene.

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    93

    Here

    http://www.makegames.com/3drotation/

    helped me out.. i also went through the camera tutorials @ gametutorials and couldn't figure out what they were doing... i found this tutorial and read through it and it answered all my questions on matrices & rotation/moving in 3D space... perhaps it may be of some use to you...
    Last edited by tegwin; 02-03-2003 at 12:43 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  2. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM
  3. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM
  4. What is a matrix's purpose in OpenGL
    By jimboob in forum Game Programming
    Replies: 5
    Last Post: 11-14-2004, 12:19 AM