Store as FVector Instead?

While I was researching how to do this (and like several other people I settled on GetActorLocation) it dawned on me that it makes more sense to store it as an FVector instead of Fstring incase it’s needed at a later date.

FString ObjectName = GetOwner()->GetName();
FVector ObjectPosition = GetOwner()->GetActorLocation();
		

UE_LOG(LogTemp, Warning, TEXT("%s is at %s!\n"), *ObjectName, *ObjectPosition.ToString());

As you can see from my code I added the .ToString() in the UE_LOG.

I was curious if anyone agreed with me as you may need to use the objects position later and if it’s stored as an FString instead of an FVector you’ll have to recall it essentially doubling the coding workload. Anyone else have any ideas on that or am I over thinking?

1 Like