Ive made an icon widget that is dynamically created and moved to a screen space position relative to an actor’s world location.
For the most part it works almost perfectly.
The only problem I am having is that when I move or pan the camera, the widget does not properly keep up with the world location, instead trailing behind it as the camera moves. Once the camera stops, the widget then swiftly catches up and accurately positions itself over the world location. The difference in position between the icon widget and the world location is quite small, but still noticable.
The general setup:
The player’s UI is a custom C++ class subclassed under UUserWidget: UCustomUserWidget
I have added a BlueprintNativeEvent to the UCustomUserWidget class: UpdateIconPosition_Implementation(AActor* InActor)
The world location is an actor. In the actor’s tick, it gets the player’s current UI (UCustomUserWidget), then passes itself into the event
The blueprint UI (UCustomUserWidget) then takes that actor and either creates, moves, or removes an Icon Widget based on where the actor is or whether the actor is on screen or not.
Is there a way to ensure the icon is as accurately atop the world location while the camera is in motion, as it is while stationary?