1
\$\begingroup\$

As part of my assignment, I've been building a scene graph framework in C++/OpenGL.

My camera works absolutely fine going backwards and forwards, but when I strafe / move on the X axis, the camera just starts stuttering. It doesn't make much sense to me, because it's the same principle to move back/forward as it is to move right/left.

Everything is also normalised and being applied by deltaTime, so that's not an issue. Interestingly, this didn't happen when I was using my intel built in gpu, but only started occurring when I forced my nvidia card to handle the program.

Here is a video of the aforementioned stutter: https://www.youtube.com/watch?v=DyTIv0yiaP0&feature=youtu.be

My scene graph is available for viewing on my GitHub:

  1. The repo: https://github.com/charliegillies/fullmetal.
  2. The camera https://github.com/charliegillies/fullmetal/blob/master/fullmetal.cpp (line 503-730, mostly get/set methods.)
  3. The camera controller https://github.com/charliegillies/fullmetal/blob/master/fullmetal-helpers.cpp (line 14-204)

Please note that this framework is still in its early days.

Let me know what you think, and I'll be sure to post a fix if I find it.

\$\endgroup\$
  • 1
    \$\begingroup\$ It looks like your sky-box is also stuttering, where it shouldn't ever move. That's probably a clue. Also what does "I forced my nvidia card to handle the program"? For something this simple I wouldn't expect you to need to do much to make it work on any video card. \$\endgroup\$ – user1118321 Nov 20 '17 at 3:03
  • \$\begingroup\$ @user1118321 By "I forced my nvidia card to handle the program", I meant that I turned the option on in the nvidia control panel that ensures that nvidia handles the graphics application. This one: 2.bp.blogspot.com/-WosBIX8W7vQ/UZVm1nOghwI/AAAAAAAABbM/… \$\endgroup\$ – Charlie Gillies Nov 20 '17 at 3:46
  • \$\begingroup\$ OK. I'm not a Windows dev, so I don't know what those options do. But that may also be a clue. \$\endgroup\$ – user1118321 Nov 20 '17 at 4:34
0
\$\begingroup\$

Fixed!

Turns out I the look at was being simply calculated in the wrong order, the eye variable and position variable were out of sync, which was causing the stutter.

\$\endgroup\$
  • \$\begingroup\$ Remember to mark the question as answered if you solved your problem \$\endgroup\$ – user100681 Nov 20 '17 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.