In my project, I have several drawers and cabinets that are constructed with blueprints, and each of them has varying loot spawning in them. Since interactable objects are so densly positioned, I can’t really use trigger volumes to open said cabinets and drawers, so I’ll have to most likely rely on line traces to do trick.
Now, my problem with this is that I can’t figure out how to communicate line trace hit across to cabinet blueprint. I basically need to know which drawer(component, in another blueprint) line trace actually hit.
My initial plan was to have line trace originate from Character blueprint (which it currently does), and have it interact with other blueprints placed around scene.
Jacky & Gabriel, thanks, both of you were super helpful.
But I still have an ongoing problem. What I specifically need to achieve here, is to figure out which component was hit with line trace from my player. Currently it only registers hit as blueprint as a whole, and I can’t seem to figure out which static mesh component it was in blueprint.
Hmm…right now all i can think of is to make a sphere overlap components at hitpoint of trace and get drawer component it overlaps. I’ll let you know if i can think of a less hacky way.