Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Quaternion woes...

  1. #1
    Member Regular Contributor
    Join Date
    May 2000
    Location
    Batavia, NY, 14020
    Posts
    259

    Quaternion woes...

    Abandoning my linearly algebreaic ways, I've jumped on the Quaternion bandwagon in the hopes of making a Camera-actor system I can actually understand. Plus, I'm trying to develope it into a portable library so that when I do a (ghasp) D3D renderer, I don't have to do quite as much work.

    Anyways, I ran into a snag. I actually have the quaternion class implemented, and yes, it actually works, the first time around. Not bad for 3 hours I'd say (props to Sobeit Void for the article on GameDev). Here's the problem. The rotation looks to be kindof strange. It rotates in the opposite direction of what it should, plus it also does a 180 degree rotation as well each frame. So the hold image flickers, and has what appears to be a 180.5 degree rotation each frame.

    Any ideas?

    Siwko
    - I am not opensource! -

  2. #2
    Member Regular Contributor
    Join Date
    May 2000
    Location
    Batavia, NY, 14020
    Posts
    259

    Re: Quaternion woes...

    Whoops... nevermind. I found my error. When converting from axis-angle, I was dividing the vector axis by the sine angle, rather than multiplying.

    Everything rotates in the right directions now, and now, hopefully, I can work on the actual camera.

    BTW: Once I get this library done, I'll try and get it posted for everyone to enjoy.

    Siwko
    - I am not opensource! -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •