Hi ![]()
I would like to know how to animate a bone scripting. I know that I can use them as transforms, manipulating its position and rotation, and that is fine… but as far as I understand, the concept of bone is composed by two points: the origin and the end of the bome.
Through the transform, I can set the position of the first point, but how could I set the position of the end point of the bone programmatically? I want to do it by using position since it is much easier for me than doing it with rotations and scaling the bone if the second point is further (the bone length must change).
In other words, I would like to move the bone according to the position of two points (start and end) or a Vector3 for its length and direction and another one for its origin.
The concept is something like this:
Vector3 start, end;
Transform bone;
bone.position = start;
bone.end.position = end; //this will not work, obviously, but Im looking for something similar
Thanks a lot in advance ![]()