logunov Posted November 13, 2018 Share Posted November 13, 2018 https://www.babylonjs-playground.com/#PP962K#13 I tried to make rotation from point1 to point2 to point3 in Oxy plane as you can see by coordinates, but after point2 the camera starts to choose a strange path out of Oxy. Why it happens? Quote Link to comment Share on other sites More sharing options...
trevordev Posted November 13, 2018 Share Posted November 13, 2018 I'm not sure what your goal is, are you trying to just rotate 90 degrees down and then 90 degrees left? https://www.babylonjs-playground.com/#PP962K#14 logunov 1 Quote Link to comment Share on other sites More sharing options...
logunov Posted November 14, 2018 Author Share Posted November 14, 2018 Thanks for the reply, but No, that's not what I need. I want to parametrically move in a circle (2D) in 3D space. And I cannot understand why, if I give 2 points as parameters of the lookAt rotary method, it leaves a circle. I say a circle, because I use quaternion mathematics, so 2 points must define an arc on the surface of a sphere, and if there are 3 points in the same plane of 3D space, they must define half of the circle. Quote Link to comment Share on other sites More sharing options...
trevordev Posted November 14, 2018 Share Posted November 14, 2018 Sorry, I'm still not sure I follow. Is there a smaller example you can provide where lookAt does not behave as expected? Other than that from your code I see a lot of assigning quaternions without .clone() so potentially there is a value/reference bug? 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.