GetWorldLocation of TargetPoint does not work in standalone games

GetWorldLocation does not return coordinates in packaged games or standalone editor mode.

Reproduce:

Make blank 4.10 game. Place TargetPoint in level. Reference in Blueprint, drag pint out, GetWorldLocation, Print this.

Results:

Play “Selected Viwwport(PIE)”: returns coordinates

Play “New Editor Widnows(PIE)”: returns coordinates

Play “Standalone Game”: returns 0,0,0

Returns also 0,0,0 in packaged games.

This bug was reported long ago here: Targetpoint world location - Programming & Scripting - Unreal Engine Forums

it does still exist in 4.10!

is there a workaround?

Ok, to answer my own question: despite the blueprint “context” offering you the location of the sprite component, you have to use the “get actor location” of the target point (see new screenshot).

I see why the sprite will be left out in packaged build. but the default context for “location” of a TargetPoint should not offer you the sprite component’s location then.

1 Like

I can’t believe this bug still exists in 4.16!
Great catch by the way. Almost hit the panic button on this issue.

Thanks so much, had exactly the same GetWorldLocation of sprite problem (4.20), nearly started deleting my Intermediate folder.