I just tried to find front position of the camera. Rotation based and I've tried this method: (OpenGL)
x = x +- cos(ry * M_PI / 180.0) * sin(rx * M_PI / 180.0);
y = y +- cos(rx * M_PI / 180.0) * sin(ry * M_PI / 180.0);
z = z +- sin(ry * M_PI / 180.0) * cos(rx * M_PI / 180.0) ;
It doesn't work very properly.
(+- means I tried both + and - operator )
x,y,z : Camera position
rx,ry,rz: Camera rotation
I searched like 'Find Camera Front'. What can I do to make this code works properly.