world position of ompound box collider

i’m trying to get the global position vector of a member of a compound box collider group. I’m using this:

boxWorldPos = box.transform.parent.transform.position + box.transform.position;

not only is the second half not giving the correct local position vector but the sum is not being calculated as i would have expected from the docs.

I know i’m being a dummy here but i’m still getting used to Vector3s and the complexities of hierarchical object relationships in Unity.

box.transform.position is the position of the box in world space, irrespective of whether or not it’s the child of another object. You don’t need to do anything extra to work it out. :wink:

“Everything should be as simple as possible but no simpler” -Albert Einstein.