Location, location, location

Here’s my code for retrieving an object’s location:

[CODE]
void UPositionReporter::BeginPlay()
{
Super::BeginPlay();

FString ObjectName = GetOwner()->GetName();
FVector ObjectPosition = GetOwner()->GetTargetLocation();
UE_LOG(LogTemp, Log, TEXT("\tPosition Reporter in Begin Play for %s, and is at %s"), *ObjectName, *ObjectPosition.ToString());

}
[/CODE]

And there it is…

I’d post a screenshot of the log output, except that when I opened Unreal Editor this morning, my “newmap” has no starter content (as it did yesterday)… :open_mouth:

Jon

Nice one! Keep up the good work and sharing it with other students.

1 Like

Thanks Sam. :slight_smile:

Privacy & Terms