I have a default pawn that inside its blueprint spawn an actor called player2 which is a character. If I press W the default pawn moves forward. I wanted the actor player2 to also move forward when pressing W. How do I achieve this?
you can try setting the player to have a higher input priority. you can also set it to auto receive input.
I’d make a switchboard type of setup on the player controller and have the pawns subscribe to input events individually.
So for example you read the input actor on player controller, and have it send an event dispatch for “spacebar pressed”.
In the pawn class you Get Player Controller → Assign event “spacebar pressed”.
You might use a branch to control whether or not the event is used. Like you have a bool called “ListeningForInput” that gets toggled on/off however you need and just use that to block or allow response to these events.
Reason I’d do it this way is because you can easily add or remove listeners and you don’t have to mess with input priorities or anything hidden in c++ engine code. You have complete control over who responds to input events with your blueprint code.
