Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5975029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:01:34+00:00 2026-05-22T21:01:34+00:00

I’m trying to get an FPS style camera working, while following along from the

  • 0

I’m trying to get an FPS style camera working, while following along from the examples in the openGL SuperBible book.

It was all going very well until I ran into the problem where you end up having roll happen, when you really only want pitch and yaw.

Similar question

This question is basically asking the same thing, but I was hoping someone might be able to be a bit more verbose about the implementation, ideally with experience of the SuperBible GLTools framework.

I’ve already tried implementing GluLookAt code which I’ve got to compile, but either I made a mistake when duplicating the functions needed, or I’m passing in the wrong parameters when using it.

I guess I’m finding it a bit confusing as the SuperBible code abstracts a bit of how the camera works, and so I’m finding it hard to implement it correctly. When testing my current version, I’m passing in parameters like this

M3DMatrix44f mCamera;
cameraFrame.GetCameraMatrix(mCamera);   //returns the matrix of the CameraFrame.

M3DVector3f up =   { 0.0f, 1.0f, 0.0f };    
M3DVector3f look = { xHeading,yHeading,0.0f }; 

//xHeading & yHeading ranges from -1 to 1 based on mouse movement, is this correct?

How should I be managing and passing in the look variables? It appears currently that the look value is staying in the same place and so if I move backwards, I end up rotating around the scene.

glhLookAtf2(mCamera, mCamera, look, up);

I feel that I have to be managing my look direction better, and possibly my camera location as well. It seems odd that the look position doesn’t seem to change.

Can anyone help, or point me in the direction of a solid tutorial path? I’m trying to avoid doing anything deprecated, but at this point I’d be really happy just to get something working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:01:35+00:00Added an answer on May 22, 2026 at 9:01 pm

    Thanks for everyones answers but the problem I had was this. In the openGL super bible, I was using their built in frame of reference class, and the problem I had was two functions, one called rotate, and rotateWorld.

    I needed to use rotate for up/down movement, and rotateWorld for left right movement. This made the camera behave correctly (fly camera).

    It makes sense as regardless of where you are looking up/down, you want the whole world to always spin around the vertical axis. Phew!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.