Keypress not firing in children BPs
I have a little issue with detecting key press. The solutions might be really simple but I'm a beginner. Of course I've searched. I think that I've created my project using mobile/tablet mode.
I want to detect when a key is pressed inside an Actor BP. Here is how I go :
I've also tried to debug with breakpoints but this code is never triggered.
This code is in a BP that inherit from another. His parent do all the things to enable input :
An important note (I think ?) I'm not sure to have a PlayerController in my world. I'm trying to do a little Guitar-Hero like so when I started the project, I've cleaned up some things (and this help me to understand some things).
There's a bit more information that is needed to know why your input isn't being triggered.
What you need to know is that all player input is captured with a player controller. You do not spawn player controllers in your level as the gamemode will take care of this for you. As a player in the game, you inherently have a player controller because of this. If you want to directly interact with an actor via a player's input, then the player controller needs to possess that actor. In most cases, a player controller will possess a pawn since the pawn class is designed to be possessed by a controller. Hope that helps.
answered May 19 '17 at 03:03 PM
If you got a Begin Play in your Child BP make sure to right Click the Event and add Call to parent. Otherwise you simply overwrite the Functionality in your Child BP and never call the parents Functionality.
Aside from that you can have Input Conflicts if more than 1 Object in your World uses your Input Event (even if it is the same Object!). They follow a certain priority order who executes the Input event first not sure about the order but expect something like Controllers before Pawns before Actors etc. and for Actors I think its the last spawned has higher priority than any other Actor.
Now if you click on your Input you notice some options in the Details panel. As you can see there is a Consume Input checkbox that basicly says if I execute the Input its "Handled" nobody else need to recive the Event. If you uncheck it you basicly say I recived the Event, I done my thing with it and if somebody else wants todo something with it feel free todo so until someone "Consumes" the Input.
Thats about it.
answered May 21 '17 at 09:42 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here