protected void newAddChildTo(ModelRenderer child,ModelRenderer parent){
  float distance=(float)Math.sqrt(Math.pow((child.rotationPointZ - parent.rotationPointZ),2) + Math.pow((child.rotationPointY - parent.rotationPointY),2));
  float angle=(float)Math.atan2(child.rotationPointY - parent.rotationPointY,child.rotationPointZ - parent.rotationPointZ);
  float newRotationPointZ=(float)(distance * (Math.cos(angle)));
  float newRotationPointY=(float)(distance * (Math.sin(angle)));
  parent.addChild(child);
  child.rotateAngleX-=parent.rotateAngleX;
  child.rotateAngleY-=parent.rotateAngleY;
  child.rotateAngleZ-=parent.rotateAngleZ;
}

protected void newAddChildTo ( ModelRenderer child , ModelRenderer parent ) { float distance = ( float ) Math . sqrt ( Math . pow ( ( child . rotationPointZ - parent . rotationPointZ ) , 2 ) + Math . pow ( ( child . rotationPointY - parent . rotationPointY ) , 2 ) ) ; float angle = ( float ) Math . atan2 ( child . rotationPointY - parent . rotationPointY , child . rotationPointZ - parent . rotationPointZ ) ; float newRotationPointZ = ( float ) ( distance * ( Math . cos ( angle ) ) ) ; float newRotationPointY = ( float ) ( distance * ( Math . sin ( angle ) ) ) ; parent . addChild ( child ) ; child . rotateAngleX -= parent . rotateAngleX ; child . rotateAngleY -= parent . rotateAngleY ; child . rotateAngleZ -= parent . rotateAngleZ ; }
don ' t use this yet . i ' m trying to refine the parenting method , but it ' s not ready yet .
