Question about inputs

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hipsterdufus
Posts: 95
Joined: Thu Aug 12, 2021 6:39 pm

Question about inputs

Post by hipsterdufus »

Hello, couple quick questions.

Sometimes when I open a UI in my game the mouse cursor gets moved to the middle of the screen momentarily almost like the game thinks it's a first person shooter for a second. I think it only happens if the InputDeviceManager component is turned on. My game is only using keyboard and mouse input and I think I have it set up correctly in that component but I don't know exactly what's causing the cursor to get hijacked like that. Any clues?

Second question is, when the user presses escape during a dialogue conversation the node is immediately skipped. I'd like it to behave more like a mouse click in my game which would just finish the typewriter effect. Where can I edit the escape behavior for dialogue system?

Thanks for your help.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about inputs

Post by Tony Li »

Hi,
hipsterdufus wrote: Sat Jan 08, 2022 9:24 pmSometimes when I open a UI in my game the mouse cursor gets moved to the middle of the screen momentarily almost like the game thinks it's a first person shooter for a second. I think it only happens if the InputDeviceManager component is turned on. My game is only using keyboard and mouse input and I think I have it set up correctly in that component but I don't know exactly what's causing the cursor to get hijacked like that. Any clues?
Something else in your project may be locking and then unlocking the cursor. When Unity locks the cursor, it moves it to the center of the screen.

If you want to entirely eliminate the possibility of the Dialogue System from locking or hiding the cursor, inspect the Dialogue Manager GameObject. Untick the Input Device Manager component's Control Cursor State checkbox.
hipsterdufus wrote: Sat Jan 08, 2022 9:24 pmSecond question is, when the user presses escape during a dialogue conversation the node is immediately skipped. I'd like it to behave more like a mouse click in my game which would just finish the typewriter effect. Where can I edit the escape behavior for dialogue system?
Inspect the Dialogue Manager GameObject. Set Display Settings > Input Settings > Cancel Subtitle Input > Key to None and Cancel Conversation Input > Key to None. This will stop the Escape key from immediately cancelling the subtitle.

Then add a UI Button Key Trigger component to your dialogue UI's continue button(s). Set the Key to Escape.
Post Reply