protected Node getAttachmentsNode(int jointIndex, SafeArrayList<Geometry> targets) {
        targetGeometry = null;
        /*
         * Search for a geometry animated by this particular bone.
         */
        for (Geometry geometry : targets) {
            Mesh mesh = geometry.getMesh();
            if (mesh != null && mesh.isAnimatedByJoint(jointIndex)) {
                targetGeometry = geometry;
                break;
            }
        }

        if (attachedNode == null) {
            attachedNode = new Node(name + "_attachnode");
            attachedNode.setUserData("AttachedBone", this);
            //We don't want the node to have a numBone set by a parent node so we force it to null
            attachedNode.addMatParamOverride(new MatParamOverride(VarType.Int, "NumberOfBones", null));
        }

        return attachedNode;
    }
Access the attachments node of this joint. If this joint doesn't already
have an attachments node, create one. Models and effects attached to the
attachments node will follow this bone's motions.

@param jointIndex this bone's index in its armature (&ge;0)
@param targets    a list of geometries animated by this bone's skeleton (not
                  null, unaffected)
@return the attachments node (not null)
jme3-core/src/main/java/com/jme3/anim/Joint.java