jjfreedman / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

btQuaternion slerp not correctly while using quat(-x,-y,-z,-w) #583

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. btQuaternion slerp(t) from quatSrc(0, -0.55, 0, 0.835) to quatDst(0, -0.72, 
0, 0.694) , it's correct.
2. btQuaternion slerp(t) from quatSrc(0, -0.55, 0, 0.835) to quatDst2(0, 0.72, 
0, -0.694), it's wrong result.
3. try to use same slerp in class vmQuat, it always works OK.

What is the expected output? What do you see instead?
quatDst2 is same as quatDst, but use negative all value. the slerp result is 
wrong.

What version of the product are you using? On what operating system?
any version of LinearMath

Please provide any additional information below.

Original issue reported on code.google.com by macbearc...@gmail.com on 2 Jan 2012 at 2:52

GoogleCodeExporter commented 8 years ago
I've attached a patch that fixes this bug. The problem was that the dot product 
of the quaternions also needed to be negated and not just the elements of the 
second quaternion.

Original comment by joshua.d...@gmail.com on 6 Jan 2012 at 3:14

Attachments: