I am attempting to create a movable widget, it seems to be working except for the movement is jittery and does not keep up with the pace of the mouse. It makes me think I am missing something on translating the absolute mouse location to local.
FReply URoMMovableWidget::NativeOnMouseMove(const FGeometry & InGeometry, const FPointerEvent & InMouseEvent)
{
FEventReply eventReply = UWidgetBlueprintLibrary::Handled();
if (HasMouseCapture())
{
eventReply = UWidgetBlueprintLibrary::CaptureMouse(eventReply, this);
FVector2D position = USlateBlueprintLibrary::AbsoluteToLocal(InGeometry, InMouseEvent.GetScreenSpacePosition());
UCanvasPanelSlot* movableWidgetCanvasSlot = UWidgetLayoutLibrary::SlotAsCanvasSlot(this);
movableWidgetCanvasSlot ->SetPosition(position);
}
return eventReply.NativeReply;
}
any tips would be greatly appreciated