Original Post
Hi fellow programmers,
i'm currently working on a prototype of a space fighting game and having a hard time figuring out how the movement of the spaceships can be realised. My first approach was using several rotation and translation matrices but while i succeed in placing and moving the ship i failed miserably in changeing the direction of the objects =(. Like if the ship is upsidedown and it should rotate left it is rotating right which doesn't surprise me but i could not find a way to solve the problem. My researches brought up these "Quarternions", which certenly are a cool thing but i don't know how to work properly with them. Is there anyone here how coud give me a hint (or a code snipet) where such "six degree of freedom" movement is actually implemented? I found a code written in python but i'm using C++ and so this doesn't help that much =(
Without this technique i'd have to convert the rotation of the worldspace into the "private" space of the ship ( http://vblab.de/files/problem.png like shown here) but failed again.
Any help would be appreciated!
i'm currently working on a prototype of a space fighting game and having a hard time figuring out how the movement of the spaceships can be realised. My first approach was using several rotation and translation matrices but while i succeed in placing and moving the ship i failed miserably in changeing the direction of the objects =(. Like if the ship is upsidedown and it should rotate left it is rotating right which doesn't surprise me but i could not find a way to solve the problem. My researches brought up these "Quarternions", which certenly are a cool thing but i don't know how to work properly with them. Is there anyone here how coud give me a hint (or a code snipet) where such "six degree of freedom" movement is actually implemented? I found a code written in python but i'm using C++ and so this doesn't help that much =(
Without this technique i'd have to convert the rotation of the worldspace into the "private" space of the ship ( http://vblab.de/files/problem.png like shown here) but failed again.
Any help would be appreciated!