OnEnableGameplayInput set to false, but can still move camera

Grannyboy

Active member
First of all im not sure if this is a UCC or UIS issue, since I got both in my project.

In the attached video you can see how my character still moves the camera around even tho the OnEnableGameplayInput is set to false:
1642331683981.png


How do I lock my mouse inputs in pause screen?

And as a bonus question, how do I call for the mouse pointer to become invisible again? Is there a specific event used by the controller to hide the mouse pointer again?

You can see it briefly in the video when I close the pause menu with escape you can still see the mouse pointer. (This also happens in game and not only editor).
 
In the demo scene I pressed escape and the camera was correctly paused - I would compare your setup to the Toggle Control Help component.

And as a bonus question, how do I call for the mouse pointer to become invisible again? Is there a specific event used by the controller to hide the mouse pointer again?
On the PlayerInput component there is a disable cursor property that you can enable or disable.
 
In the demo scene I pressed escape and the camera was correctly paused - I would compare your setup to the Toggle Control Help component.


On the PlayerInput component there is a disable cursor property that you can enable or disable.
I basically have the exact same set up as the Toggle Control Help component. I think my issue might be in the UIS since its the Display panel manager handler that decides when the cursor shows and not:
1642432218592.png
TPC Unity input script^


1642432261664.png
UIS Display panel manager script^

Maybe this overrides the OnEnableGameplayInput event? Maybe Santiago have experience with this?
 
I have another question regarding the disable and show of the mouse cursor. Dont what this thread to be confused with two questions at once so I will make a fresh one for that issue.
 
Have you compared your setup to the UIS demo scene? When I open the menu the character and camera are successfully paused.
 
Make sure your DisplayPanelManager and DisplayPanelManagerHandler are setup correctly. You can see how to set them up in the UI section of the integration documentation page:

Then as Justin suggested compar your scene setup with the demo scene setup.

The DisplayPanelManager is the one that enables or disables input when you select/unselect the gameplay panel. So if you wish to control when the input us enabled/disabled yourself you should tick off that option and such that you can have complete control over the input. Of course you'll need to listen to the Open panel events to know when to enable/disable input at that point. Have a look at the DisplayPanelManager source code for inspiration
 
Top