Button hitbox offset from actual button

Hi all,

I see several people have asked similar questions in the past, but none seem to address the problem.

I have set up a basic UI in my scene. I have a canvas which is set to render in Camera Screen Space and I have selected the correct camera. I have added a button to my canvas. If the button is in the center of the screen, it all works perfectly. When I move the button to, for example, the left side of the screen, the button hitbox appears to move more as if it is somehow scaled incorrectly. So the right side of the button would not highlight (or click) the button. It is then the same moving in other directions (i.e. moving the button down moves the hitbox lower than it should be).

Does anybody know what the issue might be? I’m trying to build for WebGL but the issue is present even in the editor. Any help is appreciated.

Cheers!

Hi all,

I did not manage to solve this particular problem and still do not know the cause for the button hitboxs moving futher than the button. However, I just reverted back to using screen space overlay UI and it seemed to fix the problem. If anybody happens to find anything It would be good for people to know.

More info: I tested with the anchors set to the center of the screen. I believe I also tested with anchors set to edge and corner of the screens and had similar behaviour.

Cheers!