- Home /
UI interaction bounds messed up
I have multiple cameras.
Game Camera - renders my game content
UI Camera - renders my UI
Final camera - renders nothing but result from other cameras are blitted in post render
Final camera uses user defined resolution, others use 320x240 to achieve retro look.
I have a UI in a canvas which uses screen space assigned to UI camera. The UI is not receiving the input from the mouse as expected. The buttons are obv renderered rather big (due to the low resolution of the UI camera back buffer and covers large portions of the screen).
Lets say I have a button with top left corner at 100,100, and a w/h of 120,30. The button would then cover more than a third of the width of the screen 120/320. I.e. be very big. When the mouse hovers over it, nothing happens. However, if I hover over the same region in screen coordinates (the ones defined by final camera), the button highlights.
What can I do to fix this?
The reason I choose to have a final camera with arbitrary resolution is that I may want to render debug information and other stuff in a higher resolution than my retro game look.
Your answer
