View Full Version : Camera rotation angles

10-08-2007, 09:23 AM
I am having trouble using camera on an lightscene scene using opengl (in c++)

I can display a scene (with multiple objects, including child objects) without any problems.

However, if the camera is attached to a null object, i cannot work out how lightwave calculates:
glRotated(z, 0.00, 0.00, 1.00)
glRotated(x, 1.00, 0.00, 0.00)
glRotated(y, 0.00, 1.00, 0.00)

I can work out glTranslated()
I use:
LWMAT_getRotate(hpb_null_object, matrix)
matrix[3][xyz] = position_null_object
LWMAT_transformp(position_camera, matrix)

To display objects, i pass the matrix to glMultMatrixf(). But this does not seem to work with cameras, any ideas?

10-09-2007, 02:51 AM
Problem solved, i needed:
LWEUL_fromMatrix( camera_matrix, EulOrdZXYr, dest_euler_angle)

(I had used EulOrdYXZr by mistake)