Player Controller with Enhanced Input System

In 5.1 Normally use Enhanced Input System.
When i search several tutorial about Enhanced Input System many people using with Character.
so binding input directly to character, then what is purpose of player controller?
I thought player controller only have raw input data, character have function about input.
is it avaliable to develop enhanced input system in player controller?
so confused.

p.s sry for bad eng, korea student developer

You can use global input in the player controller and specific input in the characters that overrides the global input per character (which can have specific actions for that character).

Input actions for jumping would be useless for a possessable character that cannot jump

You could also now with the mapping in 5.1 switch the mapping context from within the player controller

It’s the character in the end that has to implement the reaction to the inputs either sending information to its anim instance or triggering events / variable changes.

The input actions are also separated from the player controller now (only mapping is set) so it’s another level of code separation, which is a good thing.

Thank you for the answer with drawing, now i get it that overrides the global input per character.

@3dRaven Even I am just trying to get my head around this…

Just to explain what I want I would try to explain how I used to implement the old input system…

The old system:

An interface is created with all the methods… one for each control. I.e. moveforward, jump etc

The pawn class uses this interface and implements them

Inside the Controller class:
I create separate methods to execute the interface

Then I override the SetupInputComponent (I dont remember the method name exactly) method…
And finally add all the bindings inside that

I did it this way so that all the controls are at one place.

But since I started experimenting with the new input system… things are a bit different and I am getting a bit confused with how do I implement a similar system with that…
As you know the tenplates provided to us have all the controls implemented inside the character class… I did some research but nobody actually explains this thing

Some suggestions would be really helpful

Thanks🙂

Repurposed a project to implement an interface on the character bound inside of the player controller.

Just in case the file gets deleted after time (limited drive space)
Here is the most important implementation files

Character + custom movement controller (not a 100% needed but might come in handy)

CharacterMovementComponentEX.cpp (374 Bytes)
CharacterMovementComponentEX.h (478 Bytes)
LandSignCharacter.cpp (5.4 KB)
LandSignCharacter.h (2.3 KB)

Player controller
MainPlayerController.cpp (2.2 KB)
MainPlayerController.h (1.3 KB)

Interface
MovementInterface.h (1.2 KB)

5 Likes

Thank you for your answer, but somehow it doesn’t notice the implementation is implemented in character class, should I always have it implemented in blueprint?