Getting Actor Location

FString ObjectName = GetOwner()->GetName();
FString ObjectPos = GetOwner()->GetActorLocation().ToString();
UE_LOG(LogTemp, Warning, TEXT("%s is at %s."), *ObjectName, *ObjectPos);

This caused the output log in the unreal engine to say
LogTemp: Warning: SM_Chair_2 is at X=-410.000 Y=-280.000 Z=20.000.

I also used this method before looking at Ben and Sam’s solution. Would there be any reason NOT to do things this way?

Privacy & Terms