- Home /
Question by
chiodo80 · Dec 02, 2011 at 12:36 PM ·
gameobjectraycastmesh
Raycast against sub mesh of GameObject
Hi, I've a GameObject with many child that have mesh inside. I need to cast a ray from the camera to the object and get the name of the child I hitted. It's possible?
Comment
Yes, it's possible. You'll need to put mesh colliders on all the child objects, though (otherwise physics can't detect them).
I've 20 or maybe 30 children per GameObject, there is a "smart" way to solve this?