logunov Posted November 7, 2018 Share Posted November 7, 2018 Good day everyone, here is playground attempt: https://www.babylonjs-playground.com/#74G81U I'm trying to make movement from point1 to point2 by arcus of sphere, and the core goal is to prevent gimbal lock in points of pi/2. Example demonstrates my attemps to make movement from the end of red line to the end of green line though rotating with quaternions around their cross product. The question is: should start quaternion be from target.position.toQuaternion() ? which property should be used in animation object? Thank you for any advices and notes. Theoretically, to rotate object around some axis via Quaternion I should make quaternion with rule (w, v), where w = cos(a/2), and v = n*(sin/a2), where a - is my angle, n - rotation axis, then convert it to the rotation matrix, and use this matrix to prevent gimble lock on the position transform. But in animation it is not working, I do not understand why. I am sure I am doing something wrong with BABYLON API, but I can not find the problem. Quote Link to comment Share on other sites More sharing options...
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.