I made a trail in my program, which I would like to be clickable, like a button. I thought about adding a collider, and hitting it with a raycast, but it forces me to exempt it from various OnCollision triggers (it's not meant to affect them at all). How can I handle it efficiently?
Asked
Active
Viewed 98 times
1 Answers
0
You can use Unity's concept of physics layers to solve this problem. You can choose which layers interact with other layers, and pass the layer as a parameter to Raycast
to restrict to the layers you want to check against.

31eee384
- 2,748
- 2
- 18
- 27
-
This is exactly what I was looking for. Thanks! – Raledon Sep 06 '15 at 19:00