DoesImplementInterface not working

321349-img2.png

As shown in the above image, by LineTraceByChannel and DoesImplementInterface I tried to check whether or not a Hit Actor implements a specific interface, but that doesn’t work.

In the below image, when I point to an object that is an instance of a blueprint class that implement the interface, I supposed that the branch node returns True.

The below image shows that the blueprint class implements the interface.

So, why doesn’t the branch node return True at that time? Thanks.

The code looks fine, try putting a print in to see what you’re actually hitting ( actor name, component name ).

Absolutely no idea I’m afraid. Maybe take it out of the interfaces list re-compile, put it back in and re-compile?

Also might be worth re-starting the editor, if you chop and change a lot of BPI stuff, you often need to do that…

I don’t know why this isn’t working, but you could probably use tags and Actor Has Tag node very easily without changing much code here.

Thanks for your advice. I will try your solution too!

Thanks for your reply. I put the print for that and it showed the actor name(ItemParent2) that implemented the interface.

321365-img5.png

After recreating a project and implementing that, it worked, though I don’t know the reason… Anyway, thanks a lot for your advice!

There is always this kind of thing:

Quite cool, total de-coupling.

I have the exact same blueprint setup and the same problem shows for me. This same code worked one or two years ago when I wrote it so it must be a bug. I tried deleting and recreating the interface with the same result.
I’m using UE 4.24 and it worked a couple of versions ago.
I can’t even call the interface functions, that is not only is DoesImplementInterface broken but the calls to the interface are also not executed.
Somebody might want to report this as a bug although I have only little hope this will be fixed anytime soon. I’m going to try and find a workaround, probably with tags like somebody recommended