Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Gravity not working when isTrigger Collider2D is checked

Discussion in '2D' started by GuppuBoss, Apr 7, 2015.

  1. GuppuBoss

    GuppuBoss

    Joined:
    Mar 30, 2015
    Posts:
    1
    Hi.. a newbie here. I am following a arknoid tutorials.
    My problem is that
    I have a empty game object with box collider2d on it. What i trying is when ball hits the
    box collider2d it should restart the level.

    but the problem is when i check the IsTrigger on either Ball (collider2d) or Empty GameObject with collider.
    The ball stops working under gravity.

    and when i uncheck IsTrigger from ball or Empty GameObject with collider then gravity starts working.

    I have also tried using both functions OnTriggerEnter2D and OnCollisionEnter2D

    Please Suggest solution
    thanks