I'm trying to program camera movement to be relative to camera rotation. (Forward is always forward, regardless of pitch, yaw, and roll) I want to be able to move forward, backward, left, right, up, and down.
I do not want to use a matrix.
I want to use sin and cos from the standard math library.
The camera rotates on all 3 axis. The rotation order is z(roll), y(pitch), x(yaw). When all rotations are 0, positive z is forward, positive y is down, and positive x is left.
So far I've gotten forward and backward movement to work with:
velZ = speed * cos(rotX) * cos(rotY); velY = speed * sin(rotY); velX = speed * sin(-rotX) * cos(rotY);
If somebody knows how to do this or knows where I can find information on this, it would be greatly appreciated.