Question regarding my blueprint interface

Hi, I’m new to UE and just discovered blueprint interfaces. I made use of one and my blueprints work but I’m not sure that I understand 100% why it’s working and would like some clarification :slightly_smiling_face:

So, I have BP_StoneDoor which has an event to open a door and then I have the other blueprint BP_Lever. I would just like to understand why in the BP_Lever blueprint it understands that it is my third person character overlapping it. I’m using the “Open Door” interface message instead of a cast to the third person character and don’t completely understand why it’s working.
I spent a long time with this last night and by the time I found out about interfaces my mind was kind of fried lol.

Thanks :slightly_smiling_face:

1 Like

Get rid of these two calls

and make this an interface call

image

Of course, there’s no point in using an interface here, because you already know what sort of actor it is ( door ), and so could have just called the open door event, which you did :slight_smile:

You’re calling using the interface on the player, which has no effect.

Interfaces really come into their own, when you don’t know what kind of actor you’re calling the interface on. All you know is, it’s an actor.

If you renamed the call to something like ‘interact’, in could be used with all sorts of blueprints. The door would open when interact was called, but a gun would fire, and the lever would pull etc…

1 Like

Thanks for responding so fast :slight_smile: I implemented the changes and I understand it more now. I was just overthinking things because I got stuck initially and then went down a rabbit hole :sweat_smile: Thanks for your time and for clearing it up for me :slightly_smiling_face:

1 Like

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