UI button Detection is Off

For some reason the hitbox seems to get distorted the second time this menu is displayed.
Its probably best seen in the video below, but I will also describe it .

The prefab for my world space menu looks like this :

I have an animator that opens the subpanel (panel has raycast off, button images have them on)

The first time this menu is shown I can hover over the top button “Move” and the hitbox is correct.

After closing and opening the panel again, the hitbox is not where it should be. I can test this by debugging print statements with a graphics raycaster and inspecting the Event system in the hierarchy

6210026--682328--upload_2020-8-16_9-32-48.png

It seems to think the button is actually somewhere closer to the red area
6210026--682331--upload_2020-8-16_9-33-21.png

Also my worldSpace canvas does have the main camera assigned.
I’m wondering if it has something to do with the rotation of the 2D character to always face the camera like a billboard somehow throwing this off?

Any ideas? Please send them my way
Thank you

Wrong forum, this forum is for UIToolKit, you want the uGUI/Textmesh Pro forum.

Crap, sorry. Don’t suppose there are moderators to move threads here?

Maybe @hippocoder can move it if they can. You can always ask it again in that forum too, its not a big deal.

1 Like

I can move it. No worries.

2 Likes

Thanks for the move,
It seems that the character (the menu is a child of) being rotated to face the camera caused this issue. I moved the system to screen space overlay and this provided a fix. Although I’d love to know why this was happening.