But a iron ball in Otto or Bone.getAttachmentsNode is a private method ….[SOLVED]

Buddies



Classical problem … how to put attach a item in a bone? I´ve search in forum and i´m little confuse about it.



confuse a) I must use AnimControl.getSkeleton().getBone(int/string).getAttachmentsNode().attachChild(ironBall) ?

But Bone.getAttachmentsNode() is private ! :frowning: How to change this in source? There´s a simple way (i´m little noob ;))…

confuse b) As @Momoko_Fan said … i must use SkeletonControl.getAttachmentsBone() … yeah, nice … but where/how i catch this control :?



merci pour l’aide 8)

My guess from looking at the javadocs (highly recommended):



http://hub.jmonkeyengine.org/javadoc/com/jme3/animation/SkeletonControl.html#getAttachmentsNode(java.lang.String)

Hummm



Node otto …

Node stoneBall …



SkeletonControl scontrol=otto.getControl(SkeletonControl.class);

scontrol.getAttachmentsNode(“hand,right”).attachChild(stoneBall);





:smiley: work´s like a charm !

I´m addict in this engine 8)



Thanx @pspeed