View Single Post
  #2  
Old 03-20-2013, 08:23 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
This appears to be a bug with how the rotational differences are computed. It doesn't seem to be using the shortest distance in all cases. This will be fixed in the next release. In the meantime you can add the following code to the beginning of your script to get the correct behavior:
Code:
import math
import vizmat
def QuatDiff(q1,q2):
	w = abs((vizmat.Quat(q1) * vizmat.Quat(q2).inverse()).w)
	return viz.degrees(math.acos(w) * 2.0)
vizmat.QuatDiff = QuatDiff
Reply With Quote