TransformDirection? c++ question

So I have come from Unity and slowly learning to program in Unreal using C#. I for the life of me cannot find the Unreal equivalent of “TransformDirection”.
In Unity it would have looked like this…

transform.TransformDirection(inputVector.x, 0 , inputVector.y);

Basically it would calculate the X and Y controller input axis from a different objects direction.

I have found a similar worded code in unreal…

static FVector TransformDirection( const FTransform & T, FVector Direction )

But have absolutely no idea of how to use it and cannot find any examples.

Can anyone help?

Thank you

Perhaps something like this?

const FVector Direction = FVector(inputVector.x, 0.f , inputVector.y);
const FVector LocalToWorld = RootComponent->GetComponentTransform().TransformVectorNoScale(Direction);
2 Likes

Thank you so much! This was pretty much my last boss. I can pretty much duplicate my game from unity game now. I am in debt to you.