I filed this on GitHub, but it’s very strange.
Steps:
Load an MD5 animation and create controllers for each one using a clone:
(Zombie class is just an extended ObjectContainer3D)
for (var i:int = 0; i < totalZombies; i++)
{
var newZombie:Mesh = Mesh(zombieMesh.clone());
newZombie.castsShadows = false;
var zombie:Zombie = new Zombie();
zombie.animator = new SmoothSkeletonAnimator(newZombie.animationState as SkeletonAnimationState); zombie.positi Vector3D(totalZombies*100 - (i * 50), 10, -400+Math.random()*100);
zombie.animator.timeScale = 2.3 + (Math.random()*3);
zombie.mesh = newZombie;
scene.addChild(zombie);
zombies.push(zombie);
}
Change the castsShadows to true.
Observe that the clones now share the same animations and cannot be controlled separately.
This drove me crazy for hours, since I couldn’t understand why my characters were all suddenly sharing the same animation sequences. By carefully copying and pasting the code from an earlier version I saw that the castsShadows line was the culprit. Any ideas on this?