Hi, I've recently got an simple skeletal animation editor up and running but its not quite working how i'd like. At the moment I can create a series of bones from a root bone and by rotating each bone ( in any order ) I can set a pose and store the changes in their quaternions at the time of the frame. This all works fine providing all the rotations are applied to the same axis on each bone, so if I rotate all the bones on the z-axis only I can set my pose at the time sellected and then slerp between the default pose and the stored pose.
The problem is, if I rotate any of the quaternions by another axis the animation gets warped, the out of axis bone tends to get flipped and the animation is incorrect. So, does anyone know how I can avoid this and what i'd doing wrong here? I'm guessing I'm not understanding how quats work properly and that the rotation order has something to do here.
Some extra info that may be of help:
My bone structure just has one quaternion for its orientation, keyframes for transformed bones are stored like so: stored keyframeQuat = editedBoneQuat * editedParentBoneQuat.inverted. The bones are then transformed like so: for each animated bone, slerp between its default quat to stored quat based on the selected time. So the animations are applied in the oder they are stored, I have tried changing the order in which that are applied but it didn't make any differnce.
Hope this makes sense, thanks for your help.
 sorry for posting this in the wrong section, should have been in Math and Algorithms. doh