I'm making a physics game engine, and I have some decent camera functionality.(adsbygoogle = window.adsbygoogle || []).push({});

Essentially, the camera has a translation (vector) and a rotation (quaternion), and functions exist to easily move the camera along any of seven degrees of freedom (pitch, yaw, roll, strafe, elevate, move, zoom), which all works nicely.

I would like to make a function that allows the camera to go wherever you specify with ease. Essentially, it would work like gulLookAt: you would give the function a camera and three vectors. The first is where the camera should be, the second is where the camera should look, and the third is the up vector.

Given these three vectors, how can I determine the translation (vector) and rotation (quaternion) of my camera? I don't know the math to do this.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Camera translations

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**