Is it possible to create a generic event (let’s call it “Use”) that can be called on any arbitrary object that is hit by a line trace?
In other words, I have a line trace set up in my player controller. If it hits a door, I want the door to open. If it hits a lightswitch, I want that lightswitch to flip. If it hits an object without a “Use” event handler, I want it to do nothing.
I’d rather not have to spell out individual casts and events for each possible object, but as far as I can tell events require a specific blueprint reference. I haven’t been able to find a way to get a blueprint reference from an object reference generated by the line trace.
Thanks in advance!