Search Unity

2D RigidBody + Continuous Collision + IsTrigger = Doesn't work

Discussion in '2D' started by Edan-Smith, May 9, 2019.

  1. Edan-Smith

    Edan-Smith

    Joined:
    Jan 21, 2015
    Posts:
    27
    I've noticed that if you use Continuous Collision Detection, on a dynamic 2d rigidbody + set the collider to isTrigger, it doesn't get the same precision as it would with a non-trigger collider.

    With the non-trigger collider, I tested fast objects going through a thin wall and they always hit the wall.
    With the isTrigger collider, I did the same test and the OnTriggerEnter2D function doesn't get called all the times.

    Is it a bug? is it expected? is there any other way to achieve the "continuous detection with isTrigger" behavior?

    Sending a screenshot of the bullet components as attachment.
     

    Attached Files:

  2. Edan-Smith

    Edan-Smith

    Joined:
    Jan 21, 2015
    Posts:
    27
    Any chance of a mod moving my thread to "Physics" forum? I just noticed that this question might fit there better.
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,455
    It's expected. Continuous will stop the body at the point of impact but obviously triggers don't stop bodies so it's not used there.
     
    Edan-Smith likes this.