I have used the On Screen controls, creating both a stick and a few buttons, but i cannot seem to get the sticks to work. The strange thing is that they move, but the input is not actually used, the object doesnt move. The object does move and work perfectly if i drag the sticks in the editor on my pc, anyone have any ideas what might be wrong?
Thanks!
(Let me know if further information is desired, or what information.)
I got the same problem! when i use player input, i hardly can drag the onscreen stick and the action hardly be triggered. if I don’t use player input, I can drag the controll smoothly, but still have no action be triggerd
Hmmm, any solution for this? I have the same problem that OnScreenControl (LeftStick [GamePad]) works until I add the PlayerInput script on the scene.
I found that PlayerInput Auto-Switch was causing jittering and to get it to work in the editor I needed to set manually input.SwitchCurrentControlScheme(“Keyboard&Mouse”); to remove all devices.
Same problem and sadly the official Input System tutorial’s source code doesn’t containt the On Screen controllers (and if you add it still doesn’t work :() but(!) I have found 2 solutions for this.
The main problem is with the PlayerInput script, because for some reason it sends “canceled” input event immediately after the "performed" event, so you can create a bunch of if statement, and predictions to check the cancel event is fake, or:
1.) Instantiate the input action from the action map by yourself and enable/disable it on the correct lifecycle event (OnEnable, OnDisable).
If it’s enabled you can read the value from it in the Update() like in the “old” input system.
You can check this video, and focus on the assets → c# script generation and usage.
2.) The second solution is to obtain the asset itself (e.g. create a serialized field and drag that into it) and get the action mappings and actions from it. After that, you can enable/disable the action and add/remove the correct listeners to it.
I wrote a possible fix/replacement for the PlayerInput class, for example if you want to use Move action’s event you’ll need to make OnMove like I did below
After investing so much time in the new input system only to find out it needs some hacks to work on mobile. I will gladly revert back to the old input system or look some third party option.
Hi there !
I just figured out that I had no EventSystem in the scene. Therefore the On-Screen Stick cannot work. I also had to replace the StandaloneInputModule with the new input system version (Unity kindly offer a button to do that)
Not sure is its’s the same case, anyways might be related to the update type. Change InputSystem update type to manual and invoke InputSystem.current.Update() (don’t remember the exact syntax) within a MonoBehaviour Update()