-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rotation from one vector3 to another #13004
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13004/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/13004/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/13004/merge#BCU1XR#0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two comments! thanks :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes look good to me. i'll let @sebavan give the final ok
@BabylonJSGuide I tried to make a PG with this but it does not work: https://playground.babylonjs.com/#QYA3JC#24 |
@dr-vortex Will produce a working PG tomorrow. Will also study your PR to see if it has any advantages. |
Thanks! Might I also recommend we move the rotation between vectors related stuff to #13012? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagging as Request changes to prevent accidental merge waiting on #13012 comments resolution.
No for the following reasons.
|
Finally undertsand @dr-vortex 's method. As a mathematician when I talk about vectors I automatically think direction, whilst for his finction he his thinking position. My function finds the rotation between to direction vectors, whilst his find the rotation needed for the mesh to travel along a straight line joining two position vectors or points. Hence the confusion. dr-vortex examples that I now follow https://playground.babylonjs.com/#QYA3JC#28, https://playground.babylonjs.com/#QYA3JC#29 @RaananW and @sebavan I will leave it up to you whether you decide whether either, both or neither are sufficiently different to what is already possible to accept the PRs. I have made some suggests on #13012 |
First PG test for my method https://playground.babylonjs.com/?snapshot=refs/pull/13004/merge#S7HDGQ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one tiny comment and good to go !!! thanks
1st test rotationQuaternion method https://playground.babylonjs.com/?snapshot=refs/pull/13004/merge#S7HDGQ#6 |
Add rotation from one vector3 to another Former-commit-id: f31850099d8a346eefd99b9b86448e5423d9c25a
First commit wherever a result was returned this is now reflected in comments. Only comments changed, if current vector was returned then this was kept and and comment not changed. Ref https://forum.babylonjs.com/t/comments-refer-to-wrong-vectors-returned-by-method-using-toref/34093/3?u=johnk
An alternative way of managing an animation along a curve by calculating the rotation needed from a set rotation to a tangent. Example PGs to follow.