سؤال

I have two 2D object, one is use to throw by catapult and then it hit other 2D object. Both have collider and Rigidbody both have unchecked isKinetic and isTrigger. When they collide with each other then OnCollisionEnter method doesn't call and script is attached to that object which is thrown by catapult.

هل كانت مفيدة؟

المحلول

Try using OnCollisionEnter2D(Collision2D collision)

I also had that problem and this is what fixed it for me. Good luck to you.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top