Reproduction:
First Download sample source:
https://dl.dropboxusercontent.com/u/70400220/Bugs/InputBug.zip
I used the 4.2.1 launcher version to create this project, but this bug should be reproducible in 4.2 source version as well.
Now run the project in debug mode, and setup break points in Visual Studio:
One here:
void AInputBugCharacter::InputSwapLeftWeapon()
{
}
And One here:
void AInputBugPlayerController::InputSwapRightWeapon()
{
}
The keybind for action are respectivly Ctrl+LMB and Ctrl+RMB.
Function in controller will always be called, but the function in character never. The odd thing is that input actions works up to PickupItem, anything after it, just doesn’t receive input. It might be problem with my setup though.
In any case here is relevelant code:
+ActionMappings=(ActionName="SwapLeftWeapon",Key=LeftMouseButton,bShift=False,bCtrl=True,bAlt=False)
+ActionMappings=(ActionName="SwapRightWeapon",Key=RightMouseButton,bShift=False,bCtrl=True,bAlt=False)
+ActionMappings=(ActionName="RandomAction",Key=T,bShift=False,bCtrl=True,bAlt=False)
Controller:
//InputComponent->BindAction("SwapLeftWeapon", IE_Pressed, this, &AARCharacter::InputSwapLeftWeapon);
InputComponent->BindAction("SwapRightWeapon", IE_Pressed, this, &AInputBugPlayerController::InputSwapRightWeapon);
Character:
InputComponent->BindAction("PickupItem", IE_Pressed, this, &AInputBugCharacter::PickupItem);
InputComponent->BindAction("SwapLeftWeapon", IE_Pressed, this, &AInputBugCharacter::InputSwapLeftWeapon);
InputComponent->BindAction("RandomAction", IE_Pressed, this, &AInputBugCharacter::InputRandomAction);
The same issue is in Blueprints as well. When there as many as action, any input events in CharacterBlueprint are not triggered.