Checking overlap on components

So I’m trying to make a jigsaw puzzle.
I’ve created a blueprint for the puzzle pieces and you can see that I’ve added collision boxes to each edge for the purpose of testing each box for overlaps with the edges of other pieces. I want to identify each edge with a unique ID that I can then use to test for snapping together during the solving of the puzzle. The puzzle pieces spawn in the level blueprint in their correct order with all their edges overlapping as if the puzzle is solved. What I need to figure out is how to test each actor’s box collision components for overlaps and put the overlapping pairs into a list/array that can be checked later. So far I have been playing with ForEachLoops (for the array generated on puzzle creation) and get component by class, and get overlapping components, and component overlap components but I just can’t seem to get any results. I am probably just not hooking them up properly.
Any help would be greatly appreciated.

hello. What are you trying to do ? Do u want to know how to trigger an event for an overlap event ?

No what I want to do is check each of the actors to see which components (the edge collision boxes) are currently overlapping while the puzzle is put together when the level loads and make a list of which edges should be paired up. (PuzzlePiece23-EdgeTop overlaps PuzzlePiece2-EdgeBottom) That way when the placement of the pieces are randomized later I have a list of pairs to check while moving the pieces around during the game to see if the game should snap them together because they correspond to a pair on the list.

If I’m not mistaken, you need to set your system to only accept specific overlaps. If puzzlepiece1 bottom only fits on puzzlepiece2’s top, then you need to state that this is the only action possible. Therefore, they will snap together signifying the user that they made an accurate decision.

Right… but first I have to define which pieces/edges are the correct snapping points. This first part of the script is to find out which pieces/edges are the correct ones that should provide a snap when the snapping is turned on later.

Okay, I understand exactly what you are saying. You could use a bool that is set to true if anything is colliding with it and false when nothing is colliding with it. Do a separate bool for each side and the piece that connects with the corresponding side could check if that bool is true. If it is true SNAP. In this scenario I think that each puzzle piece would have to have their own unique bools for each side for this to work. I don’t know if that sounds janky? but give me your thoughts on this idea.

Edit: 64 Bools seems outrageous (minus 16 for edges?)

Well the real trick is that the puzzle is generated dynamically and could be any number of pieces. So I need to generate the overlap/collide detection in the construction script or the level blueprint on loading the level. The bool thing might help though… could I set up a bool for each component to check for overlap/collide and then get the overlapping component as a result to store for future snapping?

Yes, exactly, you could do that!

Still not sure how exactly. Still have to keep noodling I guess.

So here is my current version I am testing. Still no luck. The for each loop is getting all the puzzle piece actors coming into it but none of the components are getting collisions.

I found a solution. I’m not using components anymore. I’m using a set of bools that determine which edges are snappable on a given piece (set during the puzzle generation process) and then I determine which piece should snap to which other piece based on actor overlap and using the display name’s spawn number (actor01 connects to the left edge of actor02)