Look-at quaternion using up vector

前端 未结 3 862
离开以前
离开以前 2020-12-31 12:27

I have a camera (in a custom 3D engine) that accepts a quaternion for the rotation transform. I have two 3D points representing a camera and an object to look at. I want to

3条回答
  •  遥遥无期
    2020-12-31 13:10

    lookAt sideaxis rotatedup

    If you normalize this 3 vectors, it is a components of rotation matrix 3x3. So just convert this rotation matrix to quaternion.

提交回复
热议问题