AnimControl not in MainNode

Hi guys. I want to use animations. I use this function:

public void makeAnimation(String anim)
{
      AnimControl animControl = node.getControl(AnimControl.class);
      setAnimacia(animControl.createChannel());
      getAnimacia().setAnim(anim);
 } 

Problem is that AnimControl should be in mainNode, but I have it in node Cube and I don´t know how to get in in MainNode. I can copy and move only Cube 1,2,3,4 but no AnimControl and SkeletonControl. Is there any way to edit function makeAnimation() to read animControl from NODE CUBE and not from MAIN NODE?

node.getChild(“Cube”)? Traversing the scene? Lots of others?

Yes of course :smile:. Thank you.

The AnimControl is not in the mainNode, because an object can have several parts with different AnimControls.

As such the upper part of a human can turn left while the feet are walking forward.
Just so you know why the AnimControl is not in the mainNode :smile:

Well you could still achieve that with only one AnimControl and different animations for different bones. But an AnimControl is per skeleton and a node can contain several skeletons.