Jaime's left and right was reversed

I’m writing a demo about skeleton animation. I use Jaime as my model. So far I introduced:

  • How to display SkeletonDebugger
  • How to enable/disable SkeletonControl
  • How to attach item to Skeleton

During the writing, I found two bugs in Jaime.j3o.

One is SkeletonDebugger appears backward on Jaime, which @sgold and @nehon has solved.


Another is what I’m talking about on the title, Jaime’s left and right was reversed.

I want to attach an item to Jaime’s right hand, what I do is attach it to the “hand.L

public void simpleInitApp() {
    ...
    Spatial stick = createItem();
    
    rightHand = sc.getAttachmentsNode("hand.L");
    rightHand.attachChild(stick);
    ...
}

Result :

Why the right hand named “hand.L”? It confused me. :confused:

Then I checked the Jaime.blend(9.5MB) file to confirm what I see, I found Jaime’s skeleton was named perfectly in blender.

So, why it was reversed in jME3? :confused:

Here is my demo code.

https://github.com/jmecn/jME3Tutorials/blob/master/jME3Tutorials/src/main/java/net/jmecn/HelloSkeleton.java

And this is my article about animation, it’s all in Chinese.

Jaime is different from other models in testdata. I’m not sure why, but I don’t consider it a bug. The difference is that Jaime’s geometries are rotated 180 degrees around the Y axis relative to its main node. This breaks attachment nodes (in 3.1), skeleton debugger, and other code that assumes model geometries lack a local transform. I’m glad to know I’m not the only person who cares about such things.

By the way, I wrote a skeleton debug control that works around the bug in the skeleton debugger. It’s on GitHub at
https://github.com/stephengold/jme3-utilities/blob/master/debug/src/main/java/jme3utilities/debug/SkeletonDebugControl.java

2 Likes

well I just probably screwed it up :stuck_out_tongue:
Though exporting with ogre might add some weirdness on top of it etc… I’ll try to import it from xbuf.