Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

B21 - Enabling collider already inside another collider no longer calls callbacks.

Discussion in '5.4 Beta' started by lrasomattos, Jun 22, 2016.

  1. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Hi,

    In my game we enable some colliders to cause instant death or damage to player (e.g. Imagine an area that suddenly becomes filled with fire, we enable a collider there to cause damage to whoever is inside).

    I just updated from B10 to B21 and this stopped working, just enabling the collider when the player is already inside it won't call any callbacks.

    Not sure if it is a bug or a design decision since, even before, disabling a collider wouldn't call OnExit callbacks, but couldn't find anything on Issue Tracker or on Release Notes..
     
    Prodigga likes this.
  2. bradweiers

    bradweiers

    Joined:
    Nov 3, 2015
    Posts:
    59
    Hmmmm. It seems that the only way that the OnCollisionEnter callback is invoked is if one of the colliders has a non-kinematic rigidbody attached. And it looks like OnTriggerEnter callbacks are still invoked when overlapping colliders are enabled.
     
  3. CookieSalad

    CookieSalad

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    24
    Hi!

    Could you please report a bug through Unity with a project that would allow us to reproduce the issue and post the Fogbugz number here?

    We tried creating a simple project and it appeared to generate callbacks consistently when enabling and disabling the collider while the Rigidbody was moving through the collider.

    There would also be no callbacks when the Rigidbody was staying completely still in the collider, which is by design.