Unity 2019.4 new Input System doesn't work

Hi,

I have a problem using unity 2019 which doesn't happen in unity 2020. Installed the new input system and followed the tutorial, upon start sometimes my cursor stays visible even though its in the middle of the screen, that shouldn't be a problem to rotate the camera still, but is the first warning something with the cursor is going wrong. Even using a custom script to lock the cursor and set it to invisible doesn't hide it.

Then no matter how I move the mouse the camera isn't following the direction of the mouse, so I can't freely move my character. You can test this with a new unity 2019.4 project and building a simple character.

Do you have any suggestions other than update to unity 2020 LTS? Is the new input system even reliable for production?
 
If the problem is fixed in 2020 then it is likely something that Unity fixed in that version so in order to fix it you'll need to update.
 
Edit: The problem doesn't happen in a build only in the editor... I may try updating if that's the case, hope everything goes right.
 
Last edited:
Okay I finally updated to 2020.3 lts, but the issue is still there unfortunately even on a brand new scene using the character manager to setup a new character and the cursor locks and hides but moving the mouse doesn't rotate the camera.

I have tried everything I can think of without a result.
 
You can start debugging this by creating a new script and ensuring you can get the mouse movements when the cursor is locked. If that works then the input system is working and it's related to the integration. On the integration side the mouse movements are retrieved within GetAxisRaw so you can start to debug there.
 
I did a test with your scripts.

Mouse X and Mouse Y always return 0 - locking or unlocking the cursor doesn't change anything it just stays 0.

The issue is with the input system version the problem happens on 1.1 while on 1.0.2 it works so I downgraded to 1.0.2 to fix it in my main project. I don't know if unity messed something up in 1.1 or changed the way mouse input works and your integration can no longer detect it properly. The scroll wheel works on 1.1 as well as fire2, so just check the Mouse X and Y on that version.

One other question, since you provide CharacterInput and its not a good idea to edit it as it may change with future updates, should I make my own asset to handle my own game input like abilities, trigger certain UIs to show up etc?
 
Glad you figured it out.

One other question, since you provide CharacterInput and its not a good idea to edit it as it may change with future updates, should I make my own asset to handle my own game input like abilities, trigger certain UIs to show up etc?
Yes, you should.
 
Do you have any recommendation how this could be done? Like for example I will have my own keys to trigger UCC abilities, but we can have only one PlayerInput component per game object, so what should I do?

Edit: What I tried is copy pasting all the actions to my own asset and use it instead of CharacterInput.
 
Last edited:
Top