I’m trying to write a flight simulator but I’m having a problem with the code. Basically I’m taking the input from a joystick(hence only 2 axis for movement). I’ve been looking into quaternions but not 100% sure how to use them. Has anyone else got an algorithm, or see a major fault in my code.
Joy Z and Y are taken from a joystick
RotateScene is a constant.
ZAngle = (RotateScene * JoyZ)
XAngle =(RotateScene * joyY);
glTranslated(XTrans, YTrans, ZTrans);