Given a local frame X and a local frame Y with hierarchy something like this:
a
b
X
c
d
Y
To get the position of a point Y in local space (p) according to X’s local coordinates (p2) I use:
p2 = X.transform.InverseTransformPoint( Y.transform.TransformPoint( p ) );
But this involves calculating the world coordinate of X and Y which involves using the transforms of a and b which are irrelevant. Is there a better way of doing this?