how to enable key input for non-player character?

Hello,

I tried to let 3 non-player characters to play the same animation simultaneously by pressing a key, but failed.

Details as below:

I placed 3 mannequins(Blueprint) in my level as below.

I’m trying to press key ‘D’ to trigger them to do the same animation simultaneously.

‘Consume Input’ has been disabled and ‘Auto Receive Input’ has been set to ‘Player 0’.
image

image

But, it’s not working. Does anybody know why and how to fix it?

by the way, i’m using UE5.1

Consuming input isn’t the problem, input only works on one pawn, the one possed by the player controller. You can check in the gamemode.

There are thousands of ways to do it depending on the purpose of your application.
You can create a pawn that would be the player and that has the logic of the input.
That event make a search for those three and with a cast make the animation activate.

1 Like

@DomusLudus , Thanks for your input!
I tried the same with actor-based BP instead of character-based BP. it’s working.
In this BP, Key 1 is used to change the material of all boxes simultaneously.
I’m wondering why actor-based BP is working to capture the key input and character-based BP doesn’t?