Thread: 3D rotation problem, help please!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by GOBLIN-85 View Post
    Thank you both for the advice. I've decided to just use Quaternion to rotate the ship, i.e. when a key pressed, just rotate the ship by certain amount without adding force.

    However it is still a problem to me, as the quaternion of the ship is easy to get, how do I get the new quaternion that will be used to rotate the ship? Could you give me an example please?

    Thanks.
    Quaternions have the axis and a rotation angle, so presumably if you know how much you want to rotate by, then you're done.

    Note that rotations (whether by quaternions or any other method) are not absolute; if you've done a rotation, then further rotations will be done with respect to the new axes, not some theoretical "absolute x-y-z".

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    tabstop, I think the OP wants to know what the new axis will be.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. camera rotation matrix
    By Vick jr in forum Game Programming
    Replies: 5
    Last Post: 05-26-2009, 08:16 AM
  2. Bin packing problem....
    By 81N4RY_DR460N in forum C++ Programming
    Replies: 0
    Last Post: 08-01-2005, 05:20 AM
  3. rotation in 3d
    By DavidP in forum Game Programming
    Replies: 3
    Last Post: 11-04-2003, 10:06 PM
  4. 3D SDK for C++ programmers
    By chand in forum Game Programming
    Replies: 2
    Last Post: 05-20-2003, 07:38 AM
  5. 3d engines
    By Unregistered in forum Game Programming
    Replies: 7
    Last Post: 12-17-2001, 11:19 AM