Hello!
I’ve made a basic camera system in my game. But whenever i exit from the cctv system mouse clicks arent registered correctly anymore. When enabling the cctv in my game i set the input mode to ui only, after exiting the cctv it changes the input mode to game only.
But after, and only after, exiting the camera system it wont trigger mouse button “pressed” pressed events (it seems to trigger randomly, no delay but after random spamming it eventually triggers one on click). I should indicate that the “released” action does trigger correctly everytime but weirdly the pressed action not. I need this because when exiting the cctv the player can interact with buttons i placed in the world. Those buttons are activated by simple linetrace. So no UI for those buttons, which as i said won’t trigger due to the mouse button event “pressed” not firing.
When I change the input mode to “Game and UI” it does work perfectly, BUT after exiting the cctv and changing the mode to Game and UI it will show the mouse cursor, and I can’t seem to find a way to hide the mouse cursor again automatically after closing the cameras which is not what I want. I tried setting the show mouse cursor to false but it won’t work because it seems that the cursor is either not captured properly or something else because after hitting any mouse click (right or left mouse button) it hides the cursor again, so it seems that the mouse isn’t focusing the game (but setting the “In Mouse Lock Mode” to always lock in “Set Input Mode Game And UI” does lock the mouse in the viewport).
Would appreciate any help, thank you!