Comments and answers for "Add or substract two quaternions/rotations"
http://answers.unity.com/questions/130510/add-or-substract-two-quaternionsrotations.html
The latest comments and answers for the question "Add or substract two quaternions/rotations"Comment by qngnht on qngnht's answer
http://answers.unity.com/comments/1900334/view.html
Tue, 03 May 2022 07:57:23 GMTqngnhtComment by Ben_The_boxer on Ben_The_boxer's answer
http://answers.unity.com/comments/1634249/view.html
Thu, 23 May 2019 10:33:46 GMTBen_The_boxerComment by Ady_M on Ady_M's answer
http://answers.unity.com/comments/1589205/view.html
Fri, 11 Jan 2019 21:24:24 GMTAdy_MComment by prestonmatterport on prestonmatterport's answer
http://answers.unity.com/comments/1171718/view.html
Sat, 16 Apr 2016 05:18:28 GMTprestonmatterportComment by wibble82 on wibble82's answer
http://answers.unity.com/comments/660480/view.html
Mon, 10 Mar 2014 16:57:02 GMTwibble82Comment by robertbu on robertbu's answer
http://answers.unity.com/comments/660472/view.html
Mon, 10 Mar 2014 16:50:40 GMTrobertbuComment by robertbu on robertbu's answer
http://answers.unity.com/comments/659243/view.html
Sun, 09 Mar 2014 07:27:52 GMTrobertbuAnswer by Cameron_SM
http://answers.unity.com/answers/659240/view.html
I'm not sure why Peter G's response was voted as correct or voted up, it's simply wrong.
Multiplying a Quaternion by a vector returns **another vector**, and the vector you multiply by should be a direction vector (representing a direction from the origin), not a set of floats representing euler angles in degrees. The result of that multiply operation is that direction vector rotated by the Quaternion.
In order to add two quaternion rotations correctly you multiply them:
Quaternion newRotation = transform.rotation * otherTransform.rotation
To subtract you need to multiply by the inverse:
// Rotate back to the starting position
transform.rotation = newRotation * Quaternion.Inverse(otherTransform.rotation)
Alternatively, you can use Euler Angles and simply + (Add) or - (Subtract) the values then convert the result to a Quaternion.Sun, 09 Mar 2014 07:20:40 GMTCameron_SMComment by Quantum on Quantum's answer
http://answers.unity.com/comments/130514/view.html
Wed, 15 Jun 2011 17:38:06 GMTQuantumAnswer by Peter G
http://answers.unity.com/answers/130513/view.html
Multiplying should give you the result you want.
transform.rotation * Quaternion.Euler();Wed, 15 Jun 2011 17:34:59 GMTPeter G