JME Animation Root bone

Hello. Is there a particular reason that the rootbone has to be at (0,0,0)?

I’m asking because my format doesn’t do this. And if it’s required I will have to work it in.

There isn’t such a requirement for the engine itself - it can handle such models fine.

This might be required to fix issues with bad exporters for e.g. Blender. I believe the Blender OgreXML exporter has such a bug.

Hmm. setting a bone to userControlled doesn’t work as expected.

When I rotate manually the bone set to be controlled its as if disappears:
Notice the right hip bone missing.

This happens to any bone I manually rotate… Am I missing something?

Your code looks fine from here. (Hint: we can’t debug code we can’t see.)

Haha here.

skelControl.getSkeleton().getBone(2).setUserControl(true);


@Override
public void simpleUpdate(float tpf) {
    time += tpf;
    skelControl.getSkeleton().getBone(2).setLocalRotation(new Quaternion().fromAngleAxis(time, new Vector3f(1, 0, 0)));
}

Here’s an example using another bone (5):

Memory is vague, but I think as soon as you set user control on then you have to initialize all of the stuff.

I just looked at my own code, and I call setUserTranforms(). I think that’s what you need to do… and then you have to pass everything. Else I suspect the translation might be getting wiped out or something.

Ahh I’ll try using setUserTransforms()

Edit: That did the trick. Thanks.