So far i have the positioning of "Nodes" which are the joints to create the skeleton, and the parenting of these "Nodes" work well together. Im using a list data structure to store the children of "Nodes" on each parent.
Heres a breif pseudo image of what it looks like
CODE
[Node]---->[Node2]--->[Node3, Node4, Node5].
At the moment im updating the positions of each node according to the parent, by getting the offset of the child, and then adding that to the actual position of the parent, and it seems to work well without any bugs so far.
My problem is i cant get the Rotation to work well, i tried using the lengthdir functions and it sort of achieves the effect, but it gets really buggy, if anyone could post up an algorithm on Rotating a parent and then having its children update their rotation along the direction of the parent.
Basically the effect im trying to achieve is that of an ik solver, the ones similar to those found on 3d programs, but on a 2d object.
Thanks.
