I am creating interaction function for my blueprint.
I don’t want my blueprint to be too complex, so I prefer to use Enable Input to achieve this function, but Enhanced Input in UE5 doesn’t work.
Make sure to setup correctly.
Create An InoutAction Ibject for every Action or Axis you want.
Create an InputMappingContext and add your InoutActions there.
in your PlayerController, Get the local Enhanced Input Subsystem and add your MappingContext there.
The InoutActions are noe callable as Events or Values, using the same name as the InputAction Object.
When I press the left button, nothing happens.
What I want to achieve is for players to interact with a certain blueprint, such as a switch on the wall.
This can be easily implemented in legacy Input Systems, but there seems to be a new approach to Enhanced Input System.
Firstly:
Don´t use “Tap” modifier, if you want a simple Pressed one. Tap only reacts, if you have KeyDown and KeyUp within the specific Threshold (default 0.5sec). If you are too slow, it won´t fire.
The “Pressed” modifier fires once on KeyDown.
Second:
You are using UE 5.0 or 5.1?
If 5.0, make sure to have DefaultPlayerInputClass and DefaultInputComponentClass, both set to Enhanced Input Classes. that´s not default in 5.0, but 5.1. Without these Settings, the EIS won´t fire up events. (both classes can be found in the Project Preferences under Input)
Third:
Make sure to get the correct PlayerController of the overlapping Actor. I know… in Singleplayer Games, you may think there only can be one PC… but sometimes hiccups happen. So, on your BeginOverlap, take the Overlapping Actor and get the Controller of it, instead of just GetPlayerController from nothing.
Fourth:
Make sure you never override the PlayerInputClass in your PCs, or Block Input.
Tipp:
You don´t need EnableInput with EIS, since you simply can remove and add again, every MappingContext at every time.
Ps.:
Make sure, you don´t add any trigger or modifier to the InputAction, beside the ones in the MappingCOntext (and leave the ValueType as Bool).
go to blueprint detail window and search for auto possess player then select player 0