- Home /
How Cast a ray between two points and return all points intercepted?
Hi I am trying to return all objects in between two points. I think the best would be to use a ray but I think it only returns the first objects. I was wondering if there was some way to do this? Or if there was a better way instead of a ray?
I would need to return all objects between the two points. Attached is a picture trying to explain it a bit better.
I would like to add the selected objects to a list so that I could compare if it were a word in the list. Order is only need from front to back or back to front.
Hopefully this makes since and thanks in advance to any experts willing to help a newb :D.
You can do a Physics.RaycastAll(). Then you would eli$$anonymous$$ate any hits that are beyond the maximum distance. The use of a Raycast to solve this problem seems a bit convoluted, but it should work.
Your answer
Follow this Question
Related Questions
how do i Disable and Enable buttons? 2 Answers
Admob works on an empty project but not on my actual project 0 Answers
Player doesn't stop jumping when stop touching the screen[Android] 1 Answer
Android obfuscator 1 Answer
Distribute terrain in zones 3 Answers