Pawn on button press not working

So im new to unreal, so this may not even be the way I should do it, however on my screen I want to be able to hold down the d key, and make my pawn rotate around the z axis as long as the button is pressed. I am doing this in the pawns blueprinting event graph, not the world blueprint, however nothing happened. even if it is a simple press key → print string, nothing happens.
I have tried switching this to a different key because i though possible the player controller was referencing the d key, however no button press works in pawn blueprint, but they do in the world blueprint.

Do i need to some how completely disable the playable character(because i don’t need a character at all, just a controllable pawn) or should i create a new playable character and have it instead of this pawn. All i know, is for some reason unreal is not registering any on key inputs through this pawn and i don’t know how to fix it

for a visualization, the pawn will end up being a moving robotic arm that can grab things in scene.

Try to stay away from tick

This can do the same just make sure the timeline is set to loop

1 Like

To make the rotating component work the way you described, you’d need just this:

image

No Tick or Timeline are necessary. But the real problem here is input.


  • input is processed in a specific order, some actors get it earlier than others
  • by default Input is consumed when used - the 1st entity that gets to it will prevent other actors that are lower in the hierarchy from processing it. This is intended and desired in most but some unorthodox cases.
  • regular actors do not process input at all by default, Pawn do but they must be Possessed; here we see this Pawn is not:

image

And we do not know if you do it in some other way. To test it out:

  • create a blank project
  • create a new pawn, add the above script and drop the pawn into the level
  • make sure the auto possess is on

Not entirely sure what is going on in your current project, I’d test against this ordered list for the most likely culprits:

  • the pawn is not possessed
  • the input is consumed by something else
  • the pawn is not even in the world
  • all 3 above?
  • that particular keyboard key is broken :man_shrugging: