I’ve got my little space ship, in say list 1, and I have the angles that the players wants to rotate it by, but whenever I rotate it by those angles with
but when the user wants to roll back, it rotates it round the global x axis rather than the local axis. So I do a nice bit of complex 3D trig to calculate the vectors to rotate around, but it still screws up as the vectors have also been rotated!
Help me please! An A level maths student who can’t do trig!
Originally posted by simonjhall: Help me please! An A level maths student who can’t do trig!
Eventually, even if you get this ‘right’, you will
run into the problem of “gimbal lock” (sp?)
I have also written a small spaceship flying around a
solar system OpenGL program just for kicks and
quickly ran into the sorts of problems you’re having.
I now use quaternions to represent the orientation
(rotation) of my space ship and it works great.