Transform Matrix calculated by GetMatrixTransformBetweenNodes

GetMatrixTransformBetweenNodes() needs parent transform nodes of your nodes, so you need to use source.GetParentTransformNode() and target.GetParentTransformNode(). See details in this related post: Transformation graph for quick calculation of concatenated transforms