Enhanced Input system in player controller not character blueprint

hi i am new to unreal and my question might be a bit dumb so i apologize in advance. Is it possible to add the Enhanced Input logic like the add mapping context and Input actions to a custom player controller blueprint rather than in the character blueprint?

I know Unreal wants us to do it that way cos there in one of the starter projects “Stack O Bot” it is briefly mentioned in the BP_bot character blueprint. I would appreciate a detailed explanation with pictures if possible.

1 Like

Couple things would be implemented a bit differently but mostly it’s the same in Player Controller.

  1. You would’ve to use Event Begin Play instead of Event Possessed.
  2. You don’t need to cast to the Player Controller, just search for Enhanced Input Subsystem in the Graph.

As far as I know, everything else should be the same.

1 Like

Thank you for your response it was very informative
quick follow up question if I may. I called the Input actions nodes and connected them to the add movement nodes. the question is how do I set the target to the character that
i wish to control in the Stackbot project:

i tried to add a reference to the character as a variable and connected it to the add movement node:

once again thank you for your response and any help would be appreciated.

1 Like

In the Player Controller the On Possess event returns the pawn. Or you can use the Get Controlled Pawn node
image

Thinking about it a bit, I guess you could add the Mapping Context in On Possess Event on the Controller too.

5 Likes

Your solution worked!! :smiley: I searched online for hours and found nothing. I am truly grateful for your help

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.