Compose Transform bug?

One of these 2 possibilities should give me out the same rotation as defined in the New Var 0 Variable but none of them does. Is this a bug or what other possibility is there?

I also tried comparing the direction vectors, they were different as well.

Transform A represents QST(A) that is Q(A)xS(A)xPx-Q(A) + T(A), where Q(A) is quaternion of A, S(A) is scale of A, and T(A) is translation of A

.

Combining two transforms A and B is:
AxB = QST(AxB)

Q(AxB) = Q(B)xQ(A)

S(AxB) = S(A)xS(B)

T(AxB) = Q(B)xS(B)xT(A)x-Q(B) + T(B)

.

Inverse transform of A is:
QST(~A), where ~A is inverse of A

Q(~A) = Q(~A)

S(~A) = 1.f/S(A)

T(~A) = - (Q(~A)xS(~A)xT(A)xQ(A))

.

Convert transform A into relative transform of P is:
~P x A

Scale = S(A)/S(P)

Rotation = Q(A) x Q(~P)

Translation = T(A)-S(A)/S(P) x [Q(A)xQ(~P)xT(P)xQ(P)xQ(~A)]

(See TransformVectorized.h for more informations)

.

P: ActorTransform
A: NewVar0

So, the above graph represents this equations:
top node

{~P x A} x P

Q = Q(P) x {Q(A) x Q(~P)} = Rotate ‘the rotation of A’ by amount of P

S = {S(A)/S(P)}xS(P)

T = Q(P)xS(P)x{T(A)-S(A)/S(P) x [Q(A)xQ(~P)xT(P)xQ(P)xQ(~A)]}x-Q(P) + T(P)

.

and bottom node:
P x {~P x A}

Q = {Q(A) x Q(~P)} x Q(P) = Q(A)

S = S(P)x{S(A)/S(P)}

T = {Q(A) x Q(~P)}x{S(A)/S(P)}xT(P)x-{Q(A) x Q(~P)} + T(A)-S(A)/S(P) x [Q(A)xQ(~P)xT(P)xQ(P)xQ(~A)]

.

So… bottom node should give us the same rotation as defined in NewVar0. I did not test that blueprint.

Thanks for writing this all up! Blueprint does not have any Quaternion and I have never worked with Quaternion, also this is a bit much for me to compose with my simple Blueprint brain but I try :slight_smile:

So what you are saying is the bottom Print in that graph should print me the New Var 0 Rotation value? Because it is definitely not. What I want is rotation from world to local and then local to world which should give me then the same initial rotation value Meaning: A is New Var 0, ~P x A = N, {~P x N} x P = (rotation same as New Var 0)? (No clue what the ~ means)

There is a Combine Rotations node and a Invert Rotation node in Blueprint, might I better of trying it to do with that instead?