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());
Someone got an Idea why?
If I Print i.e. myResult.Location.X it works fine
When I save the Vector, it works fine
Sentientv2
(Sentientv2)
February 5, 2018, 11:55am
3
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
Velicante
(Velicante)
June 22, 2019, 12:26am
4
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.