Quaternions are driving me crraazzzyyy

So I'm super frustrated right now. I'm just learning Quaternions for use in my graphics engine, but am so far unable to get them to work properly. I'm trying to use a Quaternion for rotations of my First Person Camera, which seems like it shouldn't be a huge deal. Unfortunately, it's turned into something else entirely. 2 days later, it's still not working and I have no idea what I'm doing wrong. The code looks good to me! Argh. If anyone reading this happens to know all about Quaternions and would love to help me, you can check out my post on the OpenGL forums. It briefly explains the situation, and lists the main bits of code involved. Also, here's a video of what is happening:

(disclaimer: the video is down due to a change in my hosting - not sure when - or if - I'll get it back up)

  • To see mouse input, watch from the beginning.
  • To see keyboard input (go forward, backward, etc) skip to 0:51 seconds.

It seems like the world translations (i.e. forward, backward, etc) are more or less working, but the rotation (i.e. mouse movement) is totally messed up.

In other news, I'm getting interviews left and right without even raising a finger! Pretty sweet deal I'd say. I hadn't planned on sending Resumes out until the end of the month, but already I've had 2 interviews and I have another one (the 2nd interview for one of the companies) on Friday. Schweeeeet.

Cheers.

Jarrett

Update: Alright, so I figured it out (FINALLY!). Basically, I needed to take the Conjugate of my rotation Quaternion for the Camera, and I needed to cast some math results from ints to floats. Done and done.