- Home /
Question by
Anymeese · Aug 21, 2014 at 12:55 AM ·
gameobjectraycastraycasthitlayerlayermask
How to make my raycast also hit deactive objects WITHOUT showing the object?
I know how to make the raycast only check one specific layer, but the objects on the layer are deactive during one of the raycasts that I need.
1) Is there a way to make the raycast hit deactive objects in just that one raycast,
2) Should I change the objects on that layer to 0 alpha (fully transparent), do the raycast, hide the objects, then set alpha back to normal,
3) Or is there another solution that's better?
Comment
Answer by DBar · Aug 21, 2014 at 05:55 AM
mesh renderer off, yes.
That, and ins$$anonymous$$d of disabling the whole object, you only disable the mesh renderer and any components that you want.