It’s a blueprint type asset you can implement on actors that you want to be able to use it.
The interface can have a pre-set function, lets call it “React”, now any actor that implements the interface can place a “Event React” on their graph.
The magic of interfaces is that when you call it, and the other actor has it, it just works.
So when you trace you get a HitActor return. On that actor you call “interface call React”. if the actor has the interface implemented, it’ll trigger its “Event React” event.
Actually im using an interface but probably in the wrong way. Here is my setup.
My line trace from character blueprint is hitting an actor (door blueprint) with “On Interact” function/interface.
Than my door blueprint is receiving hit and I can call an event “On interact” but the problem is that he sees door as a one object. I was trying to add another actor as a component to my door blueprint which could serve as a trigger with their own function/interface so I when its hit I could send message to my door blueprint but that didn’t work either.
Im not sure if I understand how exactly interface works and that is why my whole logic is wrong. My main question is how can I have multiple actors added as a component inside blueprint.
Hey thanks for the link, now i have better understanding of child actors but still I can’t wrap my head around it.
I have set up my “Interaction” interface, both door and trigger blueprint has it implemented. Door BP has my trigger as a child actor component. Now how can I send a message/information from trigger to door?
A, maybe, simpler way of doing all of this would be to just have two collisions on my door actor: a main blocking one for the character, that my trace won’t see. And a second overlapping one, that will be picked up by my trace. Then I would just call the interface on the main actor.
In both cases the outcome is the same. I guess you pick what makes more sense to you.