I am new to Away3D. I have created a DAE model in Blender and loaded it in Away3D. The model has 3 meshes and one animation - the animation affects all 3 meshes. When I parse the DAE, the DAEParser separates the animation into 3 animation nodes giving each mesh its own animation. I gave each mesh its own SkeletonAnimator as I couldn’t figure a way of sharing the animator between all 3 meshes.
1st Problem:
When I play the animations, naturally they don’t synch, for example the coat runs faster than the body etc:
an = new Array(3);// SkeletonClipNode;
an [BODY] = mesh[BODY].animator.animationSet.getAnimation("node_0");
an [HAT] = mesh[HAT].animator.animationSet.getAnimation("node_1");
an [COAT] = mesh[COAT].animator.animationSet.getAnimation("node_2");
mesh[BODY].animator.play(an[BODY].name, null, 0);
mesh[HAT].animator.play(an[HAT].name, null, 0);
mesh[COAT].animator.play(an[COAT].name, null, 0);
How can we synchronise these animations so that they start and end at the same time?
2nd Problem:
Also how do I break the animation up into clips e.g. Walk 0-1 secs, Run 1-2 secs etc?
The animators seem only able to play() each animation from the beginning root “node_0” for BODY, “node_1” for HAT etc. right the way through to the end, and looping by default.
I have checked the node names for each animationSet, and each animationSet seems to have been given just one single node which is named with an underscore and a number reflecting the order they were loaded - I did not give them these names in Blender.
trace(mesh[BODY].animator.animationSet.animationNames);
trace(mesh[HAT].animator.animationSet.animationNames);
trace(mesh[COAT].animator.animationSet.animationNames);
returns:
node_0
node_1
node_2
What I really want is either to add more nodes to the AnimationSets OR to add more AnimationSets to the Animation.
Is there an easier solution?
Thanks for looking.