getzel Posted November 20, 2016 Share Posted November 20, 2016 Hello, 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 ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 21, 2016 Share Posted November 21, 2016 Hi! 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) getzel 1 Quote Link to comment Share on other sites More sharing options...
getzel Posted November 21, 2016 Author Share Posted November 21, 2016 Ok I see, thx for your answer. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted November 21, 2016 Share Posted November 21, 2016 @getzel I was thinking you about to learn WebGL http://www.babylonjs-playground.com/#1NE4XO#6 Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.