How to get variable from hit actor trough BP_interface

Hello guys,
I´am really begginer, strating with UE Blueprints.

I need to get variable from hit actor.
I have BP_player, whitch will raycast to some other non specific actor in the scene.A have a hit and I want to get bool from this hit actor.

I have BP_Interface, added to BP_Player and for example BP_Desk. I dont want to cast directly.

How my Interface function need to look?
I cant figure it out… Can someone please post a pic?

Thank you!

You need to do the following:

  1. Declare your interface function with the desired output:
  2. Assign the interface to your actor. the in the Functions tab you need to search it in the Override drop down:
  3. Now is just do what ever operation you want as if it is a normal function with a fixed output:
  4. Can call it as a normal interface for the Hit Actor result of the line trace:

Feel free to ask anything.
Hope it helps.

1 Like

Hello Pezzott1, It´s working!!! :slight_smile: :slight_smile: Thank you so much, it must be funny for you, bud i spend many days of my free time to get it work! (I´am 3D artist, new to Blueprints and “programming”).

THANK YOU! :slight_smile:

1 Like