0
\$\begingroup\$

No collision detected with 2D rigidbody 0 I have a ZombieBoy with a circle collider2D and a box collider2D and a RigidBody2D . The player shots energy balls which has a Circle Collider2D and a Rigidbody2D. It is set to trigger. But i have also tried without it set to trigger.

The ZombieBoy has this on its script

        void OnTriggerEnter (Collider other)
       {
          Debug.Log ("Im hit! " + other.name);
       }

       void OnCollisionEnter (Collision collision)
       {

          Debug.Log ("Im hit! " + collision.gameObject.name);
       }

But i get nothing in the console, and no breakpoints react.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Should use:

void OnTriggerEnter2D (Collider2D other)
{
}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .