Can a Player controller class automatically generate Input binding (project settings)?

Input binding is an abstraction layer - think shortcuts. The player controller can already process all input. Bindings make it more convenient and flexible to use.

Can a Player controller class automatically generate Input binding (project settings)?

Or do I always have to do the bindings manually under Project settings > Input?

some additional clarification:
I intend to migrate the character from eg the ContentExamples project to my own project. I like the character, the way it moves, etc.

So I wondered if the bindings, that you can see under Project settings, if they always must be done by hand or if they can be made auto-generated by something else, eg the Player controller (or Game mode, or something else)? Or generated during the migrate process.

So I wondered if the bindings, that
you can see under Project settings, if
they always must be done by hand or if
they can be made auto-generated by
something else, eg the Player
controller (or Game mode, or something
else)? Or generated during the migrate
process.

You will need to add them by hand.

So no bindings can ever be auto-generated by a blueprint?
I am looking into the possibilities here, what can be done, what not.

The player controller can already
process all input. Bindings make more
it convenient and flexible to use.

But if you don’t have any binding, no input is possible, or am I missing something?

But if you don’t have any binding, no
input is possible, or am I missing
something?

All blueprints have access to all input events from the get go:

311047-annotation-2020-08-23-103057.jpg

Actors don’t process them by default but this can be overridden. If you do not want to add custom binding, you do not need to.

You can create your own binding to process Q|E keys that rotate in-game camera, making it quite convenient (top)

311038-annotation-2020-08-23-103524.jpg

Or handle the boolean values yourself and write script to process them manually. Both are useful, depends on what your requirement is.

this is how the PlayerCharacter blueprint I have looks like:

This is how it looks like under Project Settings > Input

I had to import the ini-file for the Input part so it worked.
In other words; if I delete all under Input, I cant move the character anymore. No walking around with WASD and no looking around with the mouse.

Do I understand you correctly, that the Blueprint should be able to let me move around despite nothing is set under Project Setting > Input? If yes, that’s good for me, but HOW does it work?

Do I understand you correctly, that
the Blueprint should be able to let me
move around despite nothing is set
under Project Setting > Input?

Yes.

In Project Setting > Input you just define alternative names for the input; as a bonus you get to set the scale - additional data the event will produce. For example: in your 2nd pic MoveForward is using W | S | Up | Down and Left Thumbstick Y - these are native events already available in any blueprint.

But you can make a neat shortcut in the Input Bindings which allows you to use the snazzy red nodes with fancy names. Do note that you also have a much more mundane Left Shift in your first pic - it still works fine even though no binding was created in the Input Bindings, right?


Nothing stops you from doing this in the Player Character (or use the axis equivalents which I’ve shown in the pic earlier on.):

But defining your own custom bindings for whatever input you need is just more compact, readable and convenient.

Here’s another example:

311066-annotation-2020-08-23-114823.jpg

311067-annotation-2020-08-23-114753.jpg

They both do the very same thing but having an input binding is more descriptive.

Do note that you also have a much more
mundane Left Shift in your first pic -
it still works fine even though no
binding was created in the Input
Bindings, right?

Yes, the shift does work without any input mapping. Which confused me even more :smiley:
I was just about to ask “why?”, when I realized… read below

Nothing stops you from doing this in
the Player Character (or use the axis
equivalents which I’ve shown in the
pic earlier on.):

Thats a great tip! Thank you.
If I intend to have the character behave and mapped in an certain way, this would render the whole input thing unnecessary, right?

The final check to see if I got it all right:
You answered “Yes” to the question “the Blueprint should be able to let me move around despite nothing is set under Project Setting > Input?

If you referred to the usage of axis-equivalent nodes, then aight, got you. If however you meant that it should work with the InputAction nodes as in my screen capture, then it doesnt work for me. And therefore: why and what should I do to make it work?

I need to make sure if 1) either the blueprint with InputAxis nodes can work by themselves or 2) if blueprints can auto-generate input mappings under Project Settings.

If I intend to have the character
behave and mapped in an certain way,
this would render the whole input
thing unnecessary, right?

Setting input binding may seem unnecessary if all you want to do is to press the spacebar to jump - a native event Space Bar → Jump is probably OK.

But it’s convenient to have bindings if you want to do a little bit more with it. Have a look at the custom MoveUp in your example - it’s bound to 6 (!) native events; pressing any of the bound keys / buttons will invoke the same MoveUp action with scale acting as its modifier. Otherwise you’d need to duplicate your script 6 times… or at least wire it 6 times to the same bunch of nodes.


[…] it should work with the InputAction nodes
as in my screen capture, then it
doesnt work for me. And therefore: why
and what should I do to make it work?

Both should work fine. What key are you using for screen capture and which blueprint is it processed in? Are you using capture key anywhere else? Input consumption is on by default, meaning that a keystroke is processed only once the blueprint that detects it first. But this behaviour can be overridden, too.

Assuming we’re talking about taking screenshots here, placing this in the Pawn or Controller is generally enough:

311060-annotation-2020-08-23-132849.jpg

Providing you do not use the C key for anything else.


I need to make sure if 1) either the
blueprint with InputAxis nodes can
work by themselves or 2) if blueprints
can auto-generate input mappings under
Project Settings.

There is no such thing as auto-generation for inputs. You either define them yourself to make things more convenient, or use the native ones. If you ever see anything in the input bindings, someone added it manually - perhaps as a part of a template.