Custom cursor image goes off the screen

Hello, Im trying to use custom cursor in my game, I’ve created a widget and put an cursor image inside then set this widget for cursor in C++ code. Thre problem is this new cursor goes off the screen, like this:

So the tip of the custom cursor image is not the same as for regular cursor. Is there way to fix this problem? Thanks

can you show how you are setting the cursor in the first place?
what do you mean “goes off screen”:

  • does it move off the screen without input? (this would be multiple inputs situation which could be anything from you are moving the mouse in addition to the movement, to multiple mouse inputs from the user unknowingly, to a separate OS Issue
  • is the cursor allowed to move outside the Game Window? (you have to specifically restrain the mouse to the application window though this is default behavior of the operating system in Full Screen mode, but can be overridden )
  • does the cursor image persist when the mouse cursor goes outside of the Editor Window? (this will depend on how you are changing the mouse cursor in the first place

For the cursor HUD element you can either set:

  • Slot >> Alignment > X/Y
  • RenderTransform >> Pivot >> X/Y