Results 1 to 4 of 4

Thread: Camera Question

  1. #1
    Guest

    Camera Question

    I have a top view game. What camera view do I use so that when my player moves, the camera wil follow it?? Thanks.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    442

    Re: Camera Question

    Hi,


    A rather ambiguous question. OpenGL doesn't have `cameras' - they are the product of the way you setup the modelview matrix. If you want to move the `view' with the player, you should translate the entire scene to the players co-ordinates. This should be the first transform on the stack at the start of each frame. With a purely top-down view, you can achieve this with glTranslatef (-playerX, -HEIGHT_ABOVE_PLAYER, -playerZ. ).

    Hope this helps.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Earth
    Posts
    154

    Re: Camera Question

    Use the force Luke!!!

    *SCNR*

  4. #4
    Guest

    Re: Camera Question

    ThAnx

Similar Threads

  1. Camera question
    By TheGecko in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-12-2004, 03:04 PM
  2. A camera question.
    By lgc_ustc in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-02-2004, 05:27 AM
  3. Question about camera
    By Mr. Bitmap in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 07-27-2002, 02:53 AM
  4. question about camera
    By MrShoe in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-31-2001, 12:13 AM
  5. Ortho/Camera Question
    By redknite in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 10-11-2000, 07:51 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