I’ve posted this over at the Input System Forum a few days ago but are getting little response… maybe some here had the same problem and could help me out?
I recently switched my project over to the new Input system. I use the auto-generated C# script to reference it and to enable / disable my player inputs. This works well and i like the modularity of the system a lot.
However, in addition I control a freelook camera with a separate action from the same action map - for this I use the ready-to-use Cinemachine Input Provider and select my action as a reference.
However, if I disable the action map containing the camera controls action, it won’t disable and I can still move the freelook camera.
Why does the action not disable with the rest of the the action map?
@gaborkb I hope it’s okay to hijack my own thread with a different topic but it is related to the same base scenario. I noticed that when using the Cinemachine Input Provider, the acceleration on a freelook camera appears to be framerate dependent. It is very noticeable when I lower my framerate to 30-40 and use the mouse to move the camera - it is much more sensitive and reacts to minor movements compared to its sensitivity at higher framerates.
This does not seem to be the case when using the old input system.
That’s related to the input system. You can change the update cycle of the input system in Edit ▸ Project Settings ▸ Input System Package ▸ Update Mode.
By default, it’s dynamic, which is frame rate dependent. You could use fixed update or manual. Probably fixed update will be ok in your case, where Time.fixedDeltaTime determines the fps.
Also unrelated but thank you so much for your incredible contribution to this community (and your colleagues too of course!). Countless times I’ve stumbled upon your useful code snippets and answers to the many questions posted here, many of which I asked myself too at some point. Thanks again for your continuous help!
Hi, I think I need to necro this thread, I’m currently using 2.8.4 and still experiencing this issue.
I created one Action call “look” in one Action Map of the new Input System and configured it as CinemachineInputProvider XY Axis. When I switch between action maps, the “look” action always remains enabled.
Even If I start the game with no Action Maps enabled, the action assigned to CinemachineInputProvider is enabled.
In the end I solved this by creating an InputManager singleton class which creates an instance of my input asset. In this manager class I enable and disable the action maps for this specific instance of the input asset.
I did not use the provided Input component on the cinemachine but instead read through it to understand how to reference my custom InputManager class instead and then wrote my own script for the cinemachine. This way I am able to switch disable the action map of the correct instance and it works.
I can confirm I also have 2.8.4 i disable my player input gameInput.Player.Disable(); but my freelook camera still moving, so i install 2.7.3 but i have at this version same issue so looks like never been fixed ?
I think i have the same issue, cinemachine free look camera used for third person with the new input system, the camera has the “cinemachine input provider” component added. When i disable the input the player can not move, instead camera is still moving
I have this same issue. The CinemachineInputProvider does not respect the InputActionMap state, because it auto-enables the input action, so even if the action is disabled via the InputActionMap, it just gets turned on anyway (line 93):
// Auto-enable it if disabled
if (m_cachedActions[axis] != null && !m_cachedActions[axis].enabled)
m_cachedActions[axis].Enable();
I’ll probably go the route of making my own script, but it’s sad that Unity cannot make the included code work properly with other first-party packages. This is not the first time I’ve had to roll my own because the included code is inadequate.