Get relative Location from other component?

To transform from world location to relative location use [FONT=courier new]InverseTransformPosition:



FVector relativeLoc = GetTransform().InverseTransformPosition(myComponent->GetComponentLocation());


To transform from relative location to world location use [FONT=courier new]TransformPosition:



FVector someRelativeLoc;
FVector worldLoc = GetTransform().TransformPosition(someRelativeLoc);


Hope to have helped :slight_smile:

3 Likes