- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
Zubair1714 · May 15, 2014 at 07:37 AM ·
rigidbody2dcollider2dcollisionhandling
Adding a child problem
Hi! I have two object both have Collider2D attached with them, in the "OnCollisionEnter2D" method I add one object1 the the second object2. which works fine. First object1 is jumper, after adding, when I jump and the object1 falls back on object2, the "OnCollisionEnter2D" is not called and object2 is not added in the object2. It is irritating me. what I am missing here, can you point out?
Comment
try to replace your OnCollisionEnter2D with OnTriggerEnter2D and check "is Trigger" option from inspector.
resolved it, problem was when object1 was removed from the object2, OnCollisionEnter2D was called at that time and the object1 was added back in the object2. Took some time to figure it out. Anyways thanks Tasmia for Help :)