Im using an Axis 2D Vector Input Action to move my character and it works fine.
The problem starts when i pause the game → Hold the key → Unpause the game (using SetInputGameOnly)
When i do this, the Input Action Event returns way less often than it should.
I have some screenshots to show what i mean, cuz it’s kind of complex to explain
I believe this is gonna come down to execution order actually, it looks like it fires when its paused? if you never check if its paused you’ll just continue inputting
add a branch statement and check if its paused?
flush input may also help here but i think the is paused will fix
You have a deadzone or something similar configured
You might have something going on here too if this isint configured similarly for your axis
Also i use disable inputs and enable inputs when I open and close the pause menu so it might be redundant, but ill try anything xd
I’ve also tried pausing and unpausing without adding the widget and changing the input mode, in that case it works fine, so im guessing the problem has nothing to do with pausing, but with going from Input Mode UI Only to Input Mode Game Only
In may case i shouldnt need deadzones cuz im using raw values. I’ve tried all the trigger modes on the IMC (the ones which made sense to use) and all give me the same problem.
Added this print
Now we can see that it really beheaves as if i were tapping the bttn.
Thanks for your time though, keep giving me advice, i’ll keep trying anything
i don’t know if i get what you mean, or maybe i havent explained myslef properly.
I’ll make an example of what i want to achieve (excuse me if u already know what i mean xd): You are playing the game, and you pause. Before u close the pause menu u start pressing forward, so the very moment the game gets unpaused the character starts running forward.
I have no ghost inputs when i pause the game. But when i unpause it after start pressing the movement buttons, the input gets inconsistent, and returns inputs completed as if I was raising my fingers of the button.
Check the video, results stop getting printed while game is paused. And start to missbehave once the game unpauses.
Also, if u stop pressing the button and press it again it works correctly again.
The values im printing are the time the input has been triggered uniterruptedly, not the input values. Input values are always 1 or -1 since i got rid of sesitivity for movement.
It behaves just like happened before with my movement inputs.
The problem comes from changing input mode while i’m pressing the key. Nothing to do with pausing or using widgets. And flushing inputs doesn’t help either
Also this new Input is just a boolean, so axis values arent the problem either T.T
Now, if I hold W it returns as expected, triggered ultil i stop holding it
if i press E i go to Input Mode UI Only
Then I hold W. While i’m in Input Mode Only it doesnt register of course, but when It goes into Input Mode Game Only it replicates the same behaviour as in my original project
It’s definetly changing input mode while holding a key, nothing to do with pausing or the way i’ve programmed my movement.
Also i’ve tried disabling inputs before going UI Mode and enabling after going Game Mode.
I’ve managed to make it work without using a widget.
I don’t know what i’ve changed anymore, i’d love to know how, i was trying the HOLD trigger mode and got it to work. But i tried without it later and still works xd.
So I was able to swap between modes without having the funny input action thing. (No trigger modes, doesnt matter if it’s UI only or Game and UI either…)
Anyway, now the problem comes if i set focus on a Widget. I’m even able to make the widget visible and all, but if i set focus on it the problem happens again.
I need to set focus on the widget to be able to use it so im still stuck
I noticed you have a “cast to” node that’s not required, when you see that lil blue box under it generally a good idea to check that, idk if your OG project has that too but could be related
When you do “get player controller” it returns the same as the cast would i think it says something like that too if you hover
I’ve looked at this in my post history a couple times now and i had the realization that when your doing “Set UI input mode” there’s no target this is likely the problem Target should be the widget
should look something like this
^ Don’t ask why i did a custom event here its an example starting point with an irrelevant name
Obviously you don’t wanna create this every time you move lol
Definitely update here when you figure out I’m curios
I don’t have it in the OG project. MEssed it up in the test one.
I ended up making it work as I intend when i dont set focus on a widget. But since i need to set the focus on the pause menu this aint a solution for the problem.
My take now is seting the focus on the widget is what makes the input resgistration go nuts