Two Animations

I was exploring animations and was trying to make my model play two animations at once. However, in the tutorial, it doesn’t say explicitly how to do that. I was trying the following:


control = Main.player.getControl(AnimControl.class);


channel = control.createChannel();

channel2 = control.createChannel();




^Set a default animation and initialize the control and channels.

Then, when the user presses LMB, the following code is executed:







^Where Mchannel is channel from the other class, and Mchannel2 is channel2 from the other class.

However, when it works, Animation “1” doesn’t work well. If it should rotate the leg by 90 degrees, it rotates 5 or less. What am I doing wrong?

aren’t you supposed to “switch-off” the bones that are not to be affected by a given channel…I could be wrong though

1 Like

How do I switch them off? I only found: Mchannel2.addAllBones(); in the Advanced Animation Tut

Yeah mcbeth is right,

look at this tutorial

if two animations own the same bone, they’ll will both be telling it what to do, and you will get strange results

EDIT Oh it looks like you already found it… i believe adding bones is fine, i believe it will remove the ones assigned by default (which is all of them) if you do

LOOK in the test case code


AnimChannel feet = control.createChannel();

AnimChannel leftHand = control.createChannel();

AnimChannel rightHand = control.createChannel();

// feet will dodge







1 Like

Thanks a lot :slight_smile: I didn’t notice there were test cases. I added the bones which were needed and it worked well.