Disable specific input

hello people, i’m trying to disable specific input, when it doesn’t trace specific object. but in the same time this input should work for another action (movement). So when i disable input, player cant move either until trace. Does anyone have any idea ? thanks in advance

Hi,

You can’t directly disable a specific key input but you can easily achieve the behavior what you want. The trick is to use a boolean variable to determine whether you should apply that input or not. It’s best explained with the following example:

Just create a boolean variable and set its default value true (Let’s name it bCanReceiveInput). Now all you have to do is to set that boolean bCanReceiveInput to false somewhere in your logic and this specific Turn input will not have any effect on the Character anymore :slight_smile:

Hope this helps!

I got it, thank you very much for your help.