Hi,
i'm trying to do the animation of a card wich go from a deck to a table and then is shown to a player.
The part from the deck to the table works correctly :
Here is the code of the spatial transformer attached to my card
st2.setPosition(0, 0, new Vector3f(0,0,0));
st2.setRotation(0, 0, y0);
Quaternion z180 = new Quaternion();
z180.fromAngleAxis(FastMath.DEG_TO_RAD*180, new Vector3f(0,0,1));
st2.setPosition(0, 1, new Vector3f(5,-5,0));
st2.setPosition(0, 2, new Vector3f(10,-10,-(DECK_THICKNESS+0.001f)));
st2.setRotation(0, 2, z180);
So after that, my carte is in front of my player, and i want to show him the card, so i write this code :
Quaternion x90 = new Quaternion();
x90.fromAngleAxis(FastMath.DEG_TO_RAD*270, new Vector3f(1,0,0));
st2.setRotation(0,10,x90);
st2.setPosition(0,10,new Vector3f(10,-10,5));
st2.interpolateMissing();
But the card do a strange movment, the combination of few rotations.
Can someone explain me that phenomenon? :?
Is the first rotation begin again, how to stop it? Or do i have to use few spatial transformers? (and how i write : when this st has finished this animation, use this st...)
Thanks! (i have to do all the examples of the animations needed for my game for next Monday!) :cry:
PS : i haven't find an animation section so i post here, but maybe this is not the place for that! :?