How to check whether my Pawn is input enabled in Blueprint, as in some cases it DisableInput?

How to check whether my Pawn is input enabled in Blueprint, as in some cases it DisableInput?
Because I have some User Widget that can also trigger player character actions. But when there’s some other logic that did DisableInput (for some periods, or for some states like driving vehicle), I found no way to check whether it is such input disabled state, which fails to block the action input.
Or, I’m guessing, maybe it is not a good practice to do DisableInput()? Shall I try to use PlayerController possess related APIs instead, for the disable input logics?

You could create a bool on your Pawn that you set to true/false when you enable/disable the Pawn’s input and then check that bool in your User Widget.

For anyone in a similar situation and googling for a quick fix: there’s actually a node called Is Move Input Ignored that, to my knowledge, acts more or less how a node checking for a disabled input would, since Disable Input, along with everything else, disables move input. Hope that helps!

1 Like