Rigidbody blocking raycasts 2D
I have a bunny in my 2D game that has a rigidbody2D and box collider 2D on it to detect collisions. This box collider 2D is smaller than its actual size (I'm making a 3/4 top down game), so I have a separate 2D box collider under a child object that is the actual size to detect clicks and/or attacks. I have a script on this child collider to return information upon clicking on the bunny (like examining it). However, the rigidbody on the parent object is blocking the raycast from reaching the child object's collider, even when the Layer has been set to ignore raycast and I have layer mask on the raycast to only register with the child object collider. How do I keep the rigidbody AND have the raycasting function correctly?
Your answer
Follow this Question
Related Questions
2D raycast not working 0 Answers
Select from multiple character to move 0 Answers
Raycast not detecting bullet 0 Answers
Checking for Raycast distances not working as expected. 0 Answers
Inconsistent raycast2D reflecting 0 Answers