Map the forward ray back to camera

Hi! I can use ‘getForwardRay’ to capture the current forward direction of the camera, and I want to set the current forward direction of the camera using the recorded forward direction data. Is there a way to do thise?
Thanks in advance!

I think you can simply pass recordedForwardRay + camera.position to camera.setTarget.