Results 1 to 2 of 2

Thread: strafe

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2002
    Posts
    10

    strafe

    I am using gluLookAt to position my camera.
    It's initial value is
    gluLookAt( 0, 10, 15, 0, 0, 0, 0, 0, 1);
    To strafe right and left, I add (or subtract) a constant value to (or from) the eye's x value and the center x value. This seems to be ok.
    Now I want to strafe up and down but I'm not sure how. If I was using glTranslate, I would just change the y value but just adding or subtracting to the eye and center y values doesn't work. Just changing the center y value pans not strafes.
    I just want to move my look vector up and down, keeping its length and orientation the same.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    Belmont, CA, USA
    Posts
    216

    Re: strafe

    You set the UP vector to point along the Z axis. So, you strafe up and down by changing the Z values, not the Y values.

Similar Threads

  1. strafe? ? ?
    By brispace in forum OpenGL: General
    Replies: 5
    Last Post: 08-26-2005, 01:16 AM
  2. strafe???
    By brispace in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-23-2005, 07:32 AM
  3. strafe
    By schwinn in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 02-08-2002, 11:37 AM
  4. Strafe movements
    By imported_robert in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-29-2001, 09:27 PM
  5. Strafe
    By KRONOS in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 10-23-2000, 12:35 AM

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