Jump to content

lookAt and setTarget


Recommended Posts


It seems that the mesh has the method lookAt() but the rotation is then expressed in quaternions and euler angles remain at 0 with mesh.rotation

Although camera has the method setTarget. It does the same thing but the classic rotation is given.


I know how to manage that in my project. (With atan2 or get the rotationQuaternion angles)

But I ask : is there a reason for this difference in classes ?

Do you plan to integrate a setTarget method in meshes ?

Link to comment
Share on other sites


There is no good reason per se. You can still convert quaternions to euler if needed.

The inner goal of lookAt is to provide the right rotation and rotationQuaternion is far more easy and convenient (internally).

SetTarget was done before we added rotationQuaternion to cameras (mostly because of VR)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...