- Home /
2D sprites don't detect collision
Hello!
So I have 2 2D sprits with both box collider and rigidbody attached and for somereason when they collide the function OnCollisionEnter2D is not working.

Relevant part of the script:
function OnCollisionEnter2D(coll: Collision2D) {
Debug.Log("HIT!");
}
Does anyone know why? Thanks in advance:
Answer by kstress71 · Feb 06, 2015 at 09:34 PM
Look at the comments from jabez and Owen Reynolds in the post from the link above. Specifically the part ""Note that collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached." Your gameobject is flagged as is$$anonymous$$inematic = true, so it does not trigger collision events.
Your answer
Follow this Question
Related Questions
OnCollisionEnter2D isn't working 1 Answer
How to create one object, when two collide? 1 Answer
GameObject doesnt get destroyed onCollision 2 Answers
destruction on impact 2 Answers
OnCollisionEnter not working with standard First Person Controller? 0 Answers