- Home /
Question by
DevSkeletal · Oct 19, 2015 at 08:48 PM ·
c#2dcollisiononcollisionenterchild object
make OnCollisionEnter2D ignore collisons of child objects
Heres the gist of it, my player dies when it touches an enemy tagged "deadly", my enemies die when they touch an object tagged "fist", i want to have a fist object as a child of the player which moves with the animation frames of the player that can kill the enemy, however the fist is causing the player to die also is it is colliding with something tagged deadly, which results in both the player and the enemy dying
what id like to figure out is how i can have the child object of the player, acting as the fist not trigger the oncollisionenter script attached to the player, any ideas as to how i can work around this would be great as i cant seem to find anyone who has had an issue similar to this
Comment