Probably could do this before getTargetTransformationMatrix call? That call isn't necessarily cheap.