Categories
How can I make the beam ignore an object?
How can I make the ray ignore an object without using a layer?
Answer the question
In order to leave comments, you need to log in
Physics.RaycastAll() - get an array of hits of all objects that the ray "pierces", select the desired collider from the array, for example, by tag
RaycastHit[] hits; hits = Physics.RaycastAll(transform.position, transform.forward, 100.0F);
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question