Can't set widget's position by using UGameViewportSubsystem.

void UCrosshairWidget::SetAimingPoint(FVector2D Point)
{
AimingPoint = Point;
if (UGameViewportSubsystem* Subsystem = UGameViewportSubsystem::Get(GetWorld()))
{
PrintFormat(“Point:%f, %f”, Point.X, Point.Y)
const FGameViewportWidgetSlot TheSlot = UGameViewportSubsystem::SetWidgetSlotPosition(Subsystem->GetWidgetSlot(AimingImage), AimingImage, AimingPoint, true);
Subsystem->SetWidgetSlot(AimingImage, TheSlot);
}
}

In Version 5.1, UE delivers widgets to UGameViewportSubsystem.
So I get it, and use it, but not working.
The widget still stat at center(0,0).

Hi there @BaituLime, hope you’re well!

This topic has been moved from International to Programming & Scripting: C++.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile: