Compare hit locations to each other in multi line trace
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?
asked Nov 14 '14 at 10:54 PM in Blueprint Scripting
First of all, please don't bump questions that aren't unanswered for at least 4 days! Otherwise this will make the answerhub confusing.
So to solve your problem. A multiline gives you an array of the objects that were hit. So you could move through this array with a loop and breaking the Array Element. Then you would need a variable to store the last hit location and just compare the current hit location with that variable. After that, you store the current hit location in the last hit variable. Just make sure you only compare if the current index is greater or equal to 1. Because the first hit has nothing to be compare to.
If you need an image for that setup, just tell me. (:
answered Nov 15 '14 at 09:31 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here