selecting an actor by intersecting 2 objects
I'm trying to figure out is the best way to select an object with 2 intersecting bars of color. I'm going to have the player drag a color bar vertically down a 4x4 grid of spheres choosing any of the 4 rows. Then they drag another bar of the same color to the right choosing any of the columns. where the 2 bars color intersect will be the sphere that is chosen eliminating the other spheres in the rows and columns the bars reside in. The selection has to be made at the intersection of the 2 color bars not where the cursor/finger will be. Any help would be amazing!
asked Feb 14 '19 at 07:55 PM in Blueprint Scripting
the idea that spring to mind for me is overlaps, basically do a check for each sphere where it checks is this sphere overlapping both bars.
im assuming that you have some method which selects the bars for movement then deselects them when needed. in this case you would have a event that fires when a bar is deselected which will be the initiation of the check. the check itself is just a for each loop on a array containing the sphere actors. the for each will execute a get overlapping actors and compare that array to the two bars. we then use the results as well as a "and node" to determine the state of a branch. from there you just execute what you like (set that actor to a variable, destroy it, whatever).
Follow this question
Once you sign in you will be able to subscribe for any updates here