I followed the Tutorial on YouTube: “Unreal Engine 5 Puzzle Tutorial | Keypad with Lights | Resident Evil Style Puzzles”. When I encoutered this problem, I looked through all the Blueprints, and it seemed everything was fine.I tried a lot of things, but nothing worked. I´m also on version 5.4.
Here are the screenshots:
does the line get drawn if you just hit your interact key pointed at the sky?
if you hit a wall does the sound play?
first lets make sure you have the input set up in the first place, out of the key event (the box with the red top) exec pin place a “Print String” leave it with “Hello”
if you get the Hello then the key press is being received if not:
- in your project Setting in the engine under input make sure that your interact Key is registered.
- make sure that there are no other objects that could be intercepting they key press.
- move the registration of the Controller into BeginPlay() and store it into a local variable
Have you overriden or inherited StaticMeshComponent? this is supposed to be a default engine class and does not come with a ToggleActivation(), or is this supposed to be a different type?
I mean I can just interact with the Key Pad, not with the Buttons.
does the cast Succeed? (put a print string out of both output pins on the the Cast these should probably have different strings)
test it against both things that should succeed and should fail.
-if it never makes it to the cast for things that should succeed the Line trace then you might need to check collision channels on the objects (I can’t tell which channel you are tracing against in your picture) where you are using the bool output of the line trace into your branch make sure the “button” for the channel is set to “blocking”
out of the Line trace once you have the component print out the name of the component, or something that is only specifically set to it.
if the cast succeeds then make sure we are arriving into the function call:
-put a print string right off the start of the function.
there a few reasons this might fail, and many of them come down to you are not casting to the right object type. so make sure that the blueprint being casted to is the proper type.
what is the collider configuration of the “Keypad” does the keypad have a collider that could intercept the line traces before they ever make it to the button?