Ive made a Custom Mouse Pointer for my project.
I implement it by Creating it as a Widget Object from the player controller in C++:
//Create Cursor Visual
OrtCursor = CreateWidget<UUserWidget>(this, OrtCursorClass);
if (OrtCursor)
{
UPanelWidget* RootWidget = Cast<UPanelWidget>(CurrentCursorPanel->GetRootWidget());
if (RootWidget) RootWidget->AddChild(OrtCursor);
}
I move it onto the current mouse position in the tick of the Widget Blueprint of the Cursor.
Ive noticed that if I move the mouse swiftly enough, or if the game is laggy enough, the Custom Mouse Pointer Widget lags behind the actual mouse position.
Am I implementing this incorrectly?
How can ensure the Custom Mouse Pointer Widget is always at the current mouse position, regardless of how fast I move the mouse or how laggy the game is?
EDIT:
Im not sure if I should post this here or in the Blueprint Scripting forum…
I added my Cursor widget to the “Software Cursors” list, but it did not show.
What else do I need to do to get it to work?
Is there something specific I have to set in the widget?
Nevermind, turns out I had some “bShowMouseCursor”, and DefaultMouseCursor = EMouseCursor::None" shenanigans going on in my code.
Simply setting Software Cursors to my custom widget did actually do the job.