Blueprint Interface is not working

Hi all,

I’m doing this LightSwitch tutorial https://youtu.be/JSeaPXKM3k8?si=Q5QO8VrOR5QED2U2&t=372.

It looks simple but not sure why I can’t call the Blueprint Interface called “New_Interaction” to BP_LightSwitch.

As you can see from the Print String, the “E” button and the Interaction works fine.

PrintScript

Thank you.

Hi,
have you called the interface on the E button event?
If possible can you show the button press event screenshot?

A blueprint interface needs a message event to call it. You may need to turn off context sensitivity to see the message node. Make sure the BPI is implemented in both class settings for the player/playercontroller and lightswitch. A message event is shown with the little letter next to pitch call and shows as “pitch call (message)” when I’m creating the node.

2 Likes

Hi I just updated my post. Just uploaded the entire BP

Hi! Yes I have called the message event in the Lightswitch_BP. Someone on UE’s Discord told me to print display name of the hit actor. Turns out that I was hitting the wall instead of the switch.

then make sure the switch has a collision box .set it to block or overlap with “visibility”

1 Like

So this is solved? Moving the lightswitch off the wall and interacting will show if it’s working :slight_smile:

Ok I will try this! Will update!

Not yet. I’m going to add a collision box and somehow make the wall untouchable :sweat_smile:

  • the most efficient way is to set up tracing channels:

Rather than tracing against everything in the world, you only trace against interactive elements on a channel they respond to. The system is quite granular.

https://www.unrealengine.com/en-US/blog/collision-filtering

You can add your own channels. Really helps down with the clutter.

  • another way is to first ask whether the hit actor actually implements the interface so you’re not attempting to send messages to everyone you’re looking at
2 Likes

Yes it’s working! Thanks!

1 Like

Thank you I will learn and try this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.