Hi,
We have an issue where the input that we are pressing is not taking in account when it is flushed. In our case we have a jump input that have a pressed and a release action.
This input is also used on another mapping context to validate when a popup message appears on screen. When the popup message appears on screen we flush the inputs of the player controller to prevent the moment where the player is pressing the jump input when a popup appears. The issue that is occuring is when this happened we have the press the validate input twice to remove the popup when it doesn’t if we are not flushing the inputs
Steps to Reproduce
- Create 2 different Input Actions
- Create Mapping Context for each input actions and bind them to the same input
- Add the first mapping context at priority 0
- Hold the input
- Flush the inputs
- Add the second mapping context at priority 1
Now if you are pressing the input it won’t work the first time only the second
Hi,
Apologies for the wait.
Unfortunately, I haven’t been able to reproduce this where I use a “Set Input Mode Game and UI” node to flush the inputs in 5.4 and just using “Flush Player Input” in 5.5.
If I flush inputs and keep holding spacebar it continues on and closes the popup widget I made as I bound the next mapping context to close the popup.
It continues on if I have the action binded to triggered, but if I have it set to started I still only need to press space bar once to close the popup.
Would you be able to provide a small example project of this issue?
If not, another option could be to bind the mapping context to when the key is released.
Regards
Hi,
Sorry for the late answer. It’s a bit complicate for us right now…
Apparently the bug occurs when we put the game in pause.
Do you manage to reproduce it if you are :
- Pressing the input
- Put the game in pause
- Flush the inputs
Regards,
Simon
No worries! Unfortunately I am still unable to reproduce it.
Just to clarify this is the logic I have in BP_ThirdPersonCharacter in the third person game template, and in my widget that is used for the popup.
Does the following look like it is missing anything that might need to be tweaked to get to the issue? (The only thing changed from the defaults in the input asset is allowing it to trigger when paused)
[Image Removed]
If we’re unable to reproduce it, I can go ahead and pass it up to Epic to infer repro conditions / steps. Any extra details regarding project set up would be greatly appreciated.
Thank you!