• Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!

We're also offering banner ads on our site from just \$5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

Posted 06 April 2013 - 01:49 PM

q and -q represent the same rotation, unit quaternions are a double cover for the sphere.

The only issue is when interpolating/slerping quaternions, you want to go the quickest route rather than the long way round, but you can do that by checking that the quaternion dot product between the 2 quaternions is positive, if it is negative negate one of the quaternions before interpolation.

EDIT: If you think about the axis/rotation form of a quaternion it is easy to see that -q and q represent the same rotation; the axis is negated but so is the rotation angle => they represent the same rotation.

EDIT2: Euler angle representations aren't unique either, so converting Euler angles to a quaternion and then back again might not give you the same angles back either ;)

EDIT3: So in conclusion, there's nothing to worry about.

Posted 06 April 2013 - 01:47 PM

q and -q represent the same rotation, unit quaternions are a double cover for the sphere.

The only issue is when interpolating/slerping quaternions, you want to go the quickest route rather than the long way round, but you can do that by checking that the quaternion dot product between the 2 quaternions is positive, if it is negative negate one of the quaternions before interpolation.

EDIT: If you think about the axis/rotation form of a quaternion it is easy to see that -q and q represent the same rotation; the axis is negated but so is the rotation angle => they represent the same rotation.

EDIT2: Euler angle representations aren't unique either, so converting Euler angles to a quaternion and then back again might not give you the same angles back either ;)

Posted 06 April 2013 - 01:40 PM

q and -q represent the same rotation, unit quaternions are a double cover for the sphere.

The only issue is when interpolating/slerping quaternions, you want to go the quickest route rather than the long way round, but you can do that by checking that the quaternion dot product between the 2 quaternions is positive, if it is negative negate one of the quaternions before interpolation.

EDIT: If you think about the axis/rotation form of a quaternion it is easy to see that -q and q represent the same rotation; the axis is negated but so is the rotation angle => they represent the same rotation.