Multi line trace

Hi all

Im using a multi line trace to find if there are a crate/s in front of my character,.
But needing some advice on how to approach comparing each vector to the previous one in the array. during the loop process
So for example: If the hit location returns a distance bigger than a amount i want… (ie) There is a gap between the crates… Therefore allowing me to know, this one needs to be ignored. Any ideas?

Hello,
I am not sure this is what you need but if i needed to distinguish two crates i would store display name from “break hit” “hit actor” output and check if new one is equal or not.

So here is a function iam using to find the closest actor of a certain class you can easylie mod this to return you every actor in a certain range wich is what i guess you want

Thank you for the image… im gonna try to explain some more so you have a better idea.

So i have a character that can kick boxes a set 100units, per kick, because everything is on a grid. and of course when you kick the boxes around you can end up with the boxes in a line/row So before player kicks the box im tracing out into the world checking if there are other boxes in its path and if they are all lined up correctly and have no gaps they should all move… i already have this working. but i need to know how to find out if there is a gap between my boxes.

ie when the hits return from my trace i save the location vector of each hit into a array. which i was then planing on somehow while looping figuring out if the hit location from each other in the array has more than a 100 units from its previous index, then that would allow me to know that oh that box is to far away so should not be included in the kick,

186bddc0338b22800e990fc9d89699455e523ffb.jpeg

I deleted last idea i got but i wonder if you can’t set this “reaction event” in your crate. Like a get overlapping box a bit larger than your crate and each time it overlaps a crate (even with a variable “moved” set by player character which gives locations to consider or not based on character / first crate location / rotation) this crate moves too.

well you have a direction in wich you “kick” why dont you do single line traces from above to the bottom in 100 steps and then see if the trace hits the ground or a box or the “EndFrame”

I want to do is move a box around a level with a character…
Each time i kick/push the box it moves a set 100units in either x or y depending on what direction my character is facing… Done

I now have multiple boxes in my level and when lined up in a row,. when i kick/push the first box all the boxes that are in a row need to move…
i trace out into the world finding the array of actors i hit and moving them all together… Great…

But for example purpose…
If there are spaces between boxes. ie the returned hit locations are box1 x100 y0 z0… box2 x200 y0 z0, and finally box3 is x400 y0 z0…
Because box3 is is more than 100 away from box2. i would know i should not include box in the array loop i use for telling what boxes to move with this kick. until say box 1,2,3 are together then of course i would move all 3 boxes.

My Question is… How to get to to check off the previous hit to the next hit if its move than 100untis