I'm making a 1sr person flight combat game. Now camera roll, tilt, pan would rotate allot but I would also want to use a free rotation for the camera without losing it's current angle.
Really don't know how rotate works so I use this code.
var cam[3];
cam[1] -= mouse_force.x * 4;
cam[2] += mouse_force.y * 4;
cam[3] = 0;
vec_rotate(vector(cam[1],cam[2],cam[3]), vector(player.pan, player.tilt, player.roll));
camera.pan = cam[1];
camera.tilt = cam[2];
camera.roll = cam[3];
only thing is every time I switch to free cam view the camera angle goes back to normal and rotates on it's usual angle and not the base on player's angle which means I'm not doing it right. Any help?