Comments and answers for "Matrix rotation of a Vector3 around three planes of rotation"
http://answers.unity.com/questions/315229/matrix-rotation-of-a-vector3-around-three-planes-o.html
The latest comments and answers for the question "Matrix rotation of a Vector3 around three planes of rotation"Comment by CHPedersen on CHPedersen's answer
http://answers.unity.com/comments/315411/view.html
No worries. I've deleted my answer again, as I see no reason to have 2 identical answers to the same question.Sun, 09 Sep 2012 10:00:37 GMTCHPedersenComment by Jessy
http://answers.unity.com/comments/315366/view.html
This is not Unity forum-specific etiquette. Imagine somebody reads a question of yours in one place, and answers it, despite it being answered somewhere else. If you're going to clutter up the internet with duplication, please try to be make others aware of the mess. Please value the time of others.Sun, 09 Sep 2012 04:59:29 GMTJessyComment by MCorrin on MCorrin's answer
http://answers.unity.com/comments/315294/view.html
Hi Christian,
Small but subtle difference was that the Quaternion.Inverse call. I couldn't get the code to compile without an error when I used '-plane.transform.rotation'.
Thanks though! Michael
I hadn't seen your other correction below. Sorry. I appreciate it though!Sat, 08 Sep 2012 22:40:34 GMTMCorrinComment by CHPedersen on CHPedersen's answer
http://answers.unity.com/comments/315290/view.html
That's the same as the answer I posted. There is literally zero difference.Sat, 08 Sep 2012 22:33:24 GMTCHPedersenAnswer by MCorrin
http://answers.unity.com/answers/315285/view.html
Brian Stone posted this answer on the forum and it addresses my problem perfectly.
[http://forum.unity3d.com/threads/150444-Matrix-rotation-of-a-Vector3-around-three-planes-of-rotation][1]
[1]: http://forum.unity3d.com/threads/150444-Matrix-rotation-of-a-Vector3-around-three-planes-of-rotation
Here is what he wrote:
If you have a matrix or quaternion which represents the orientation of the plane, then all you need to do is calculate the Inverse of that transform and multiply it to the point. This will transform the point to the World's identity orientation (X:<1,0,0>, Y<0,1,0>, Z<0,0,1>), because any matrix multiplied by its inverse is the identity matrix*.
Matrix4x4 M; // set this to the plane's orientation
Vector3 v3_orig; // some point that intersects with the plane
Matrix4x4 Mi = M.inverse;
Vector3 v3_final = Mi * v3_orig;
* implies that the matrix is square and non-singular.
And to demo with Quaternion:
Quaternion qi = Quaternion.Inverse(plane.transform.rotation);
Vector3 v3_final = qi * v3_orig;Sat, 08 Sep 2012 22:32:03 GMTMCorrinComment by MCorrin
http://answers.unity.com/comments/315281/view.html
Hi, I'm new to this forum and certainly didn't want to break with the etiquette of the space. Just so I'm clear, when you ask me to provide cross-links are you referring to other related posts within unityAnswers or more of my own material?
In what was likely also a bad move on my part, I threw this question up in UnityAnswers and on the Forum as I was pretty desperate to get an answer today (deadline looming).Sat, 08 Sep 2012 22:10:16 GMTMCorrinComment by CHPedersen
http://answers.unity.com/comments/315265/view.html
I +1'ed it again for providing clear description text and for formatting code properly. I do not think this question deserves to be downvoted.Sat, 08 Sep 2012 21:16:19 GMTCHPedersenComment by Jessy
http://answers.unity.com/comments/315260/view.html
Thumbs down for no crosslinks.Sat, 08 Sep 2012 21:04:15 GMTJessy