Linetrace to static mesh component


I currently have a elevator blueprint. Inside this blueprint I also have a static mesh button. How can I access that
static mesh via LineTrace from the Firstperson blueprint?

So when the LineTrace hits that object, I can fire off an event in the ElevatorBlueprint graph.
Is this possible and how would I go about doing so? :slight_smile:


Try out the HitComponent mate, check if it is equal to the button static mesh of ElevatorBlueprint. I would first cast the hit actor to ElevatorBlueprint, if i can cast it then i shall check the HitComponent with the button static mesh.

As CKong said, you need to cast it to the actor first, then you can access it components, like mesh, collision and so on.

Send a screenshot of the BP where you tried it.

I sorta tried that. Tried to get the component from the ElevatorBlueprint, but im not sure how to reference it :confused:

Sorry for not answering for a while. Fallout4 got me way to addicted.

Attached a screenshot. I have hooked it up to “CastToElevatorBP”
Not sure how I can make the linetrace recognize the “floorbutton” and when interacted with it fires off an event.
I might be stupid and miss something really obvious.

I figured it out. “Component has tag” from “Hit component” did the trick :slight_smile: