I have some objects casting Rays with the:
Foreach object cast a ray, and this 20 objects are hitting a ray to 1 box.
I want to make a script that detects how many of this rays are actually hitting thr box.
Thanks and sorry for my english.
I have some objects casting Rays with the:
Foreach object cast a ray, and this 20 objects are hitting a ray to 1 box.
I want to make a script that detects how many of this rays are actually hitting thr box.
Thanks and sorry for my english.
As you loop over them, and the raycast results true, increment an int for the count.
Well, it just count 1 when there are 20 rays hitting it.
And 0 when there are 0 rays.
Show me the code?