Line trace on Collision Volume hit event?


I’ve just run into a bit of a problem which I thought would be really common but from what I can see, is not common at all, in fact, I can’t find anything in regards to it.

Basically I have a big box which is a blueprint, it has 2 holes/slots in the box and 2 collision boxes, 1 for each slot Called “Slot1Collision” and “Slot2Collision”.

The idea is that if the player is carrying an object to go into those slots, he has to place the object in one slot or another by hitting his USE key (line trace by visibility), and the object would physically be placed in the slot he hit the use key on. Slot 1 might fill the room with sand, Slot 2 would open the door to the next room for example.

The problem that occurs is that while the line trace DOES hit the collision boxes, the boxes don’t generate any hit events, they cannot do an event when the line trace hits them.

I have been working around it with some very rough blueprinting scripts, but it’s just messy and frustrating to work with.

Am I just overlooking something reeeeeally simple here? I feel like this is just something super simple that for some reason I am just not understanding or seeing.

Thank you in advance.

Yeah a line trace does not generate a hit event as far as I know, why don’t you just break hit result, and then if the hit component is the correct collosion box, do what you wanted to do?

Thankfully, I answered my own question just after asking it on here lol (This is why I normally wait a while before asking anything :P).

Since the game world is filled with interactive objects, I have every interactive object implement an interface with a USE function.
My work around was to add an input variable to the USE function which takes in an actor component.
From the line trace hit, I get the actor component output and plug it into the function input.

Then on this box with the slots, I implement the interface and do the USE Event. From there I check to see if the component hit is equal to the Slot1Collision or Slot2Collision objects to determine whether to do the appropriate script for slot 1 or slot 2…if that makes any sense what so ever :stuck_out_tongue: