Hello
I'm trying to understand linear algebra code i'm reading and i'm stuck visualizing two built in functions for UE4.
- InverseTransformPositionNoScale(FVector Location)
To give some context:
In the code they get the Root transformation from a animation
InSequence->GetBoneTransform(RootTM, 0, AtTime, false);
Then they get the world transformation of the bone.
GetAnimBoneWorldTM(InSequence, AtTime, BoneIndex, BoneTM);
Near the end of the function they take the root transform and use the inverse functions for the position.
RootTransform.InverseTransformPositionNoScale(BoneTransformLocation);
I looked at how those functions work but I don't get how this helps.
The InverseTransformPositionNoScale function does this:
TranslatedVector = BoneTransformLocation - RootLocation
// ( Rotation.Inverse() * (V-Translation) )
VectorResult = VectorQuaternionInverseRotateVector(Rotation, TranslatedVector);
return VectorResult;
When we subtract the two vectors we will get a resultant vector that would look something B:
![Subtracting two vectors by putting their feet together and drawing the result.](https://www.dummies.com/wp-content/uploads/329855.image0.jpg)
Now when we translate the vector then rotate it we should get an effect like this?
![](https://uploads.gamedev.net/forums/monthly_2020_02/389461c697384740834e5ba6b30a44dc.image.png)
I want to know if i have the right idea or if im horrible off on all of this.
Thanks!