- Home /
Question by
xyHeat · Sep 20, 2017 at 12:44 PM ·
c#raycastraycasting
Raycast goes throught objects [C#]
Hi everybody !
I have a question : can we make a Raycast from an object A to an object B while checking a boolean on all objects between A and B ?
Thanks, xyHeat
Comment
Best Answer
Answer by unit_nick · Sep 20, 2017 at 01:00 PM
https://docs.unity3d.com/ScriptReference/Physics.RaycastAll.html
Also has the advantage of being the fastest of all raycasts if you have to make more than 1 call.
Your answer
Follow this Question
Related Questions
What's wrong with my RaycastHit2D? 1 Answer
Another Raycast Issue. 0 Answers
Problem with raycasting, checking for ground doesn't work 3 Answers
(C#) Collider to collider2d 0 Answers