attachLeaf parent bug fixed. rotate wrote by myself. the one from internet didnt have support for parent