- Home /
Question by
abi-kr01 · Jun 10, 2014 at 01:51 PM ·
collisiongameobjectraycast
Multi object detection with single ray cast
Hi , i want to detect two different game object with single ray cast ,right now i can get ray casting of single game object. Can we do that in unity if yes then plz advise
Comment
Best Answer
Answer by Landern · Jun 10, 2014 at 02:03 PM
Use Physics.RaycastAll which states:
Casts a ray through the scene and returns all hits. Note that order is not guaranteed.
Examples of usage/implementation are in the docs.