-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Documents the "arc-based" Quaternion constructor #74838
Documents the "arc-based" Quaternion constructor #74838
Conversation
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.
This documents the api.
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.
This works on non unit sphere vectors?
My understanding is "no", that you need to use points on the unit sphere, however, I'm not the greatest at math. :-) |
I remember this working on points not on the surface of the unit sphere but still using the unit sphere model. Like non-normalized. Might have been my own version of it. |
I did a quick test:
... which gives this output:
On a sphere with a radius of 50, you end up with a non-normalized quaternion that doesn't give right result when used in a rotation. So, it looks like it does need to be on the unit sphere. However, if you do have points on a non unit sphere, then you just need to normalize both vectors before passing them to the |
Thanks! |
Cherry-picked for 4.0.1. |
This undocumented Quaternion constructor turned out to be exactly what I needed for a VR prototype I'm working on. Documenting it so it's easier for others to find! :-)