Search Unity

collider 2d child react on parrent collilider 2d actions

Discussion in 'Scripting' started by Milossd, Oct 19, 2018.

  1. Milossd

    Milossd

    Joined:
    Oct 13, 2018
    Posts:
    13
    Hi.I have very simple game where are 5 colliliders 2d.
    One is on circle(Player),and others are up,down,left,right side to detect if there is collision with ball.
    My problem is that when player eats ball(first / middle collilider 2d) i get one debug log which is "Player eat ball."
    But when i hit ball with one of colliliders on side i get "Zone eats ball" and second log "Player eat".
    Player collilider is not toutching with ball in any way there is some space between side colliliders and player.
    https://imgur.com/a/w4mcmF8

     
  2. Milossd

    Milossd

    Joined:
    Oct 13, 2018
    Posts:
    13
    I use separated classes in one was player collider 2d methond and second class is destroy with collider 2d method.
    But it doesnt help :(
     
    Last edited: Oct 19, 2018