I am creating a sprite rig animator for 2D sprite movements and have formatted it so that the rig is built from 2 classes; limbs and joints. Each limb has a joint either end, and there is no limb limit for each joint (i.e. any joint can have as many limbs coming off of it as necessary). The joint class contains an array of limbs, and on creation, the limb knows it's parent automatically, therefore a tree is developed from 1 single joint(as I wanted). The problem comes when I need to iterate through each and every branch of the tree, so that any joint movements translate to any children(hence the point in the rig). Having already attempted to solve this, I then moved onto researching algorithms for it, however Binary Tree's are not suitable for my situation and that was all that I could find. and was wondering if anybody could point me in the right direction.
Thanks for your help
It looks like you're new here. If you want to get involved, click one of these buttons!