I am missing some… understanding about animations:I am trying to animate playing cards.
When my card game starts, the player gets 9 cards, and I would like to animate them nicely, as his “hand” would open in front of him, so the cards should be animated around a path defined by a portion of circle, first one nearly moving, second one a bit further, middle one (5th) vertical, last having the longest animation.
Animations are both transitions, that I managed to figure out looking at some example, each keyframes being calculated by trigonometry and a rotation, at least around z axis first, to have the card nicely oriented and this is where I am struggling… here is for an idea of the look and feel www.hubris.ch/chibre2020/anim5.html
and here is the playground where I isolated part of the code: Babylon.js Playground
What I am not understanding: I am building the path of the translation based on a fixed number of keyframes, specifying a value for each keyframe, because this cannot be interpolated, but regarding the rotation, why can’t I just specify starting angle for frame 0 and final angle for frame “number of keyframe” ? Shouldn’t it sync with the translation ? Instead of doing the 90 degreees I wanted it does a crazy load of full turn…
Is animating mesh.rotation.z impacting the actual roation.z propriety of the mesh or it is about increasing it continuously ? not sure that makes sense, but … yup I am confused-> help !