Hello,
i have a Problem with rotating a Bone in a SkinnedMesh.
I determine the current Orientation with
getOrientation and writing this values without a modification in a KeyframesSequence, but the bone moves!? Printing out the values shows me that the scalar component changes, but why??? Do they work with degrees or radians ???
Regards,
4had
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| float[] angleaxis = new float [4]; float[] KF_angleaxis = new float [4];
Obj = myWorld.find(10);
((Group)Obj).getOrientation(angleaxis);
KF_angleaxis[0] = angleaxis[1]; KF_angleaxis[1] = angleaxis[2]; KF_angleaxis[2] = angleaxis[3]; KF_angleaxis[3] = angleaxis[0];
KeyframeSequence KS = new KeyframeSequence(2, 4, KeyframeSequence.SLERP);
KS.setKeyframe(0, 0, KF_angleaxis); KS.setKeyframe(1, 500, KF_angleaxis);
KS.setDuration(500); KS.setValidRange(0, 1); KS.setRepeatMode(KeyframeSequence.CONSTANT); AnimationController AC = new AnimationController(); AC.setActiveInterval(0, 500); AC.setSpeed(2.0f, 0);
AnimationTrack AT = new AnimationTrack(KS, AnimationTrack.ORIENTATION); AT.setController(AC); Obj.addAnimationTrack(rotTrack); |