Camera Transformation for a ray tracing app How to rotate and translate the camera?

Hi All,

I’m getting really confused whilst trying to implement a camera that can move around in a ray traced scene and also rotate. When the up arrow is pressed, the camera should move forward in the direction it is looking. I’ve seen several example using DirectX but none really for pure raytracing cameras. I’ve tried using a rotation matrix, but I don’t know how to alter the camera’s movement to follow where it is looking, instead of moving at an angle sideways.

Can anyone help shed some light?

Anyone? I have a rotation matrix, but this seems to mess up when i rotate 180 degree around the y axis.