Mouse cursor with weird offset

Hi everyone, how is it going?
So, I have a problem in my game that when I use ConvertMouseLocationToWorldSpace or Get hit result under cursor I get a really bad offset from where I’m clicking.
I tried to change de blueprint of the character, controller, gameMode and HUD but nothing worked

Anyone had a problem like this before?

When I create a new level from scrath, the GameMode and the player blueprint works perfectly, when I copy and paste the assets from the level that I using for my game, the mouse cursor keeps the strange offset.

Hey, **Est_engine, **thanks for the response!

So, I tried and checked my collisions, but nothing different happened. Something that I discovered however, is that the mouse is moving “in lines”. I used an event tick to debug the position, like you did, and then when I move up and down or side to side the debug looks like this.

The strange thing is, if I build a new level from scratch, the mouse works, when I transfer everything from my actual level to my new one, starts the bug again. And if I delete all after the transfer, the bug continues there.

Hello there! After a time trying to solve this I discovered something…
It seems that after certain distance the click offsets from the mouse pointer.
Here are some images of my tests and my blueprint workflow for this line trace. For me it looks like an engine bug or a project bug, but I really don’t know how to solve it, I tried to create different levels but all have the same problem with this mouse click offset at certain distance from the world origin…

Is there anyone from Epic Team that could help my team with this or give a hint what could be?

I made a video to better illustrate what is occurring at my project:

Mouse click offset video

1 Like

Hey, Dejan, thanks for the reply!

Unfortunately, this didn’t work as well :frowning:

What we learned about this problem is that the conversion from the screen location to world is comming, we don’t know why, with an offset.

Our team is thinking that it could be some corrupted setting at the project settings or something more global because if we import the same blueprint to an blank new .uproject it works.

If anyone knows about some setting or file we could restore to solve this it would be awesome :slight_smile:

nopes, but i encountered the same issue and would be interested in knowing.

1 Like

Hi all, I was having a similar issue. The mouse cursor seemed to be offset in X,Y coordinates. Also, the offset seemed to be smaller when closer to upper left corner of the screen, and bigger when closer to bottom right corner of the screen.

What fixed it for me is:

I was using the function “GetMousePosition”. Changing to “GetMousePositionScaledbyDPI” fixed the issue for me.

I hope this helps someone.

2 Likes