2D Box Collider not Working
I've been working on a very simple game similar to Angry Birds, but even more simplified. It's a math game, so the only thing you need to change is the Velocity to solve the problem and win. I followed this tutorial to the mark, and I had a completely functioning Angry Birds mock-up.
However, I've been slowly dismantling parts of the code piece by piece to simplify it and change it to my needs. During that process, suddenly the 2D Box Collider for the 'Bird', in this case Star, stopped colliding with things altogether. I made sure that both in Unity and in the code it was enabled, and did a Debug.Log function just to make sure. But for some reason, it just stopped colliding. I even recreated the exact original scene and that wasn't colliding anymore. Does anyone have any idea why?
Here's the code related to creating the Star:
And here's the code related to shooting the Star:
Any help would be extremely appreciated! Any clarifications, I'd be happy to make!
Answer by Tsuki92 · Apr 25 at 12:11 PM
Looks like you are writing code to get component Collider2D and not BoxCollider2D?
Your answer
![](https://koobas.hobune.stream/wayback/20220613055731im_/https://answers.unity.com/themes/thub/images/avi.jpg)