JM3: direct bone movement? (w/o) name

I understand that i can name an animation in blender and set the keyframes, but thats not what i want;-)

What i want is:

I have – lets say – 3 bones in my model, named “stand”, “ring” and “head”. Using the weight painting method in blender, i created a xml-file with certain values for that.

Now i want to set values dynamically, so lets say i simply want to scale bone “ring” by a factor of 1.1f in y and rotate bone “head” by 10° around the z-axis, while expecting the mesh to deform accordingly.

How do i do this? All documentation i found just handle the ‘imported named animation case’…

look at the TestOgreComplexAnim test case

It demonstrate how to create differents channels and how to apply different animations on different parts of the skeleton.

It also demonstrate how to move bones “by hand” in the simpleUpdate method (though consider using a control instead of putting the code in the simpleUdpate)

hm, ok ill check that…

what i tried so far is


AnimControl monsterControl = spatial.getControl(AnimControl.class);

Bone ring = monsterControl.getSkeleton().getBone("Ring");



ring.getLocalRotation(), ring.getLocalScale());[/java]

That should do nothing, but is a) gets the ring (yeah!) and b) deforms the mesh (fuck!)

It deforms the mesh because the local transform is already applied in the bone, in a sense you’re applying it twice. You’re not setting the local transform, the local transform is bind pose * user transform.