# Two 2D objects in Unity aren't colliding together

In Unity 5, I have a player shooting a projectile in aim to hit a boss, and inflict damage upon contact with the projectile. Though for some reason, the projectile and boss aren't colliding with each other.

I've done the following;

• Made sure that both the projectile and boss have a BoxCollider 2D and Rigidbody 2D
• Made sure that they're on the same Z-Index and on the same layer
• Tried to Debug.Log() if there's any collision (there isn't)
• Made sure I'm using OnCollisionEnter2D on the boss' health script
• Compared the syntax I use with another collision (where the player collides with an object and dies - this works perfectly fine).

However, none of these seem to be working.
This is the boss' health script:

void OnCollisionEnter2D (Collision2D coll)
{
Debug.Log("COLLIDED");
bosshealth -= 1;
}


Here is the projectile prefab:

And the boss prefab:

Does anyone have a clue as to why they're not colliding? the projectile just glides over the boss

EDIT: I found a temporary fix! Disabling the Kinematics of the boss allows for both objects to collide, and successfully display a debug message! Just a problem though; I don't want the boss to freely float around in space. I use the kinematic to ensure it stays put at all times until told to by scripts.

Is there a way to get around not having to disable the kinematics?

EDIT 2: Then again, I am removing the projectiles on impact anyway, so the actual boss doesn't move, but that seems dirty :/

• Found a temporary solution - see edit. – davidpox Dec 3 '15 at 23:58
• See the Collision Action Matrix on this page from the Unity docs: two kinematic bodies colliding does not call collision event functions. However, if you change your bullets so IsTrigger == true, then OnTriggerEnter2D will be called. – DMGregory Dec 4 '15 at 0:50
• I see, thanks! I guess it makes sense. I've set the projectile as a non-kinematic now, and I'll work it from there – davidpox Dec 4 '15 at 0:53
• Feel free to add an Answer with the fix you've found, so others can use it for reference. After a delay, you'll be able to mark your own answer as Accepted. – DMGregory Dec 4 '15 at 1:18