Hello there,
I am trying to calculate the xyz position of “important” regions on my models, I am doing this by:
Transform [] allChildren = this.transform.GetComponentsInChildren<Transform>();
foreach (Transform child in allChildren)
{
Vector3 objectPos = child.transform.position;
}
However this only gives me an xyz coordinate of the center of each object. However what I need is the xyz coordinates of points like the elbow and shoulder, instead of these I am actually obtaining the xyz coordinates of the center of the upper arm.
One way I can see of obtaining the coordinates I need would be to obtain the size of the upper arm and then extrapolate the location of the Shoulder and elbow from that.
How would I go about obtaining the size of the body part to calculate this? I’m pretty stumped right now.
Note: I am using this Model