Also do not get AnimControl like this :
because controller might be in child nodes of it.
I use something like this method to play animation on my complex models :
public static void playAnimation(Spatial model, String animationName) {
SceneGraphVisitor visitor = new SceneGraphVisitor() {
@Override
public void visit(Spatial spatial) {
if (spatial instanceof Node && spatial.getControl(AnimControl.class) != null) {
AnimControl control = spatial.getControl(AnimControl.class);
AnimChannel channel;
if (control.getNumChannels() > 0) {
channel = control.getChannel(0);
} else {
channel = control.createChannel();
}
channel.setAnim(animationName);
channel.setLoopMode(LoopMode.Loop);
}
}
};
model.depthFirstTraversal(visitor);
}