Question by
Deeblock · May 17, 2018 at 06:20 AM ·
raycastraycasthit2dlayerlayermask
Allow raycast to skip an object with rigidbody
I have a gameobject on the Ignore Raycast layer that has a box collider 2D and a RigidBody component attached to it. Its child is on another layer and has a trigger collider which I want the raycast to hit. However, the raycast never reaches the child and gets blocked by the Rigidbody of the parent, despite the parent being set on the Ignore Raycast layer and the raycast having a layermask that only interacts with the child's layer. How do I solve this? Thanks.
Comment