|
Post by Korv on May 21, 2015 16:17:08 GMT
Hi All,
I have problem with my melee attack for my character. Character has child object. Both they has killable scripts. Also child killable invincible.
So when I use sword (child object) to kill enemy character take damage. How to prevent this behavior ?
Thanks in advance!
|
|
|
Post by DarkTonic Dev on May 21, 2015 16:38:10 GMT
Unity will force child colliders without rigidbodies to register hits on the parent instead when it has a rigidbody. Nothing we can do about it. So, the first question is: do your child Killables both have their own colliders and rigidbody? If not, step 1 is adding those.
Let me know if you still have problems. Have you studied the Composite Killables example Scene?
|
|
|
Post by Korv on May 22, 2015 11:17:25 GMT
Thanks a lot. You right. )) Problem was due to rigidbody absence. Also I forget to uncheck "Inv.While Children Alive". But that was another story...
Thanks for reminder about examples.
|
|
|
Post by DarkTonic Dev on May 22, 2015 15:12:01 GMT
No problem.
|
|