Why I cannot get Input Events?

I have these setups in blueprint of a pawn:

However, the input event is not triggered. Why?

Additional info: I have a actor just have a camera component and it is assigned as the default pawn in the game mode.

[Video Demonstration Link][4]

I know it crashes at the end. No problem. After I relaunched it, I could not get the inputs again :S

Make sure you have your own version of PlayerController setup too (if you started his project based on a starter kit). Inside the GameMode blueprint, set this controller as default one.

In this case you wont need to posses the Pawn manually. All this can be set in the default properties panel.

Actually, I forgot to mention that I have also created a new Controller derived from the PlayerController class in C++ and assigned it as the playercontroller in gamemode.

However, you mean there is no logical problem right?

You mean I need to create my custom player controller and do no change in it so that it will be able to get the inputs. How? and Why? :slight_smile:

Actually what suppresses it not to get the input events?

None that I can see.

Check your Key bindings too. And add a print_string right after the Input Axis event and see if it gets fired. Oh and try removing that manual possession.

  • There is no problem in key bindings.
  • It does not get fired I can see that by just looking at the line connected.
  • I added that manual possession just after I tried it without it. :slight_smile:

For testing , try creating a new PlayerController BP directly from the editor and assign it as the default controller. Lets see what happens now.

Nothing changed. Why it does not work!? :S I really cannot understand thee structure of the gameplay mechanism. I cannot figure out how those mechanisms work. :S

Its quite simple, really. You might be missing something very simple. Give me a couple of hours and let see what we can do. In the meantime, please show me the screenshots of your Game and Map settings, GameMode properties, and your Pawn’s proeprties

I have added a demonstration showing the whole process. You should check it :wink:

Why are you creating a different pawn for the camera? Currently you are possessing the camera pawn and thats why the other pawn is not receiving input.

I know. If you look at the 2nd picture, I try to control that pawn via possession. In the video there is no possession as ‘mindfane’ suggested. However, at the beginning there was the possession of course :wink:

@EaryT

Like Jacky said, you cannot feed the input to more than one Pawn at the same time. A controller can possess only one Pawn and only that Pawn will get the inputs.

In your second picture, if you look closely, you are calling GetCotroller on a pawn and then calling Posses with the same Pawn. The problem is if your Pawn (an instance of that blueprint) was not already possessed, the function “GetController” wont return a valid reference. So that BP event graph ends up doing nothing.

If on the other hand, if the Pawn was already possessed, you re-possess it to the same controller, still doing nothing.

I am not sure why you would need to do it this way, but instead of using Pawn->GetController, try using GetPlayerController node. and feed its output for possession target.

But like I said, if you include the camera inside the Pawn as a component, there is no need for all this.

Ok. Thank you so much! I began to understand the way of using player controller. :slight_smile: