Conversion FVector to FString not right

Hi,

I’m trying to save Location from a LineTrace to a File.

World->LineTraceSingleByChannel(myResult, start, end, channel );

And when I try to read the Location I get some … well not a Vector

    UE_LOG(LogTemp, Warning, TEXT("Current: %s"), myResult.Location.ToString());

140064-1.png

Someone got an Idea why?
If I Print i.e. myResult.Location.X it works fine

When I save the Vector, it works fine :slight_smile:

The %s is denoting a pointer to a TCHAR pointer. You can get this from your FString by dereferencing the result of your ToString() call.

So it would be:

UE_LOG(LogTemp, Warning, TEXT("Current: %s"), *(myResult.Location.ToString()));
1 Like

It’s happening the same for me, and yes I am passing the string with the dereferencing operator *
Why is this happening?
I am running UE4 on Mac, is it possibile that it’s trying to print a unicode text?

Maybe you should post your own question? OP’s question was already answered. It’s also bad form to resurrect old posts from 2 years ago.