Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Feedback OnTriggerEnter/Exit triggers when toggling state on iskinematic

Discussion in 'Editor & General Support' started by MDADigital, Apr 27, 2020.

  1. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    This change was introduced in 2019.3 before that the events correctly only fired when a collider entered or exit a triggers bounding volume. I really dont care about the underlying technical change in physx.

    Unity is an abstraction ontop of SDKs like Physx. So it should provide a semantic correct API.

    OnTriggerEnter/Exit indicates that when a collider leaves or enter the boundaries of a trigger those events will fire. Not when toggling state of the attached rigidbody iskinimatic. My suggestion is that you make sure the events work like before 2019.3. Keep track of which triggers you are inside, and when lower level physx events trigger because of iskinimatic make sure not to bubble this up to the subscribers of OnTriggerEnter/Exit.

    This change competently breaks our game, and its unfixable without introducing alot of complexity and not to mention unwanted dependency.
     
    scionious likes this.
  2. TDUMicrobe

    TDUMicrobe

    Joined:
    Jun 21, 2017
    Posts:
    2
    Same Issue !!! WTF ?
     
  3. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,519
    Another option would be to expose a bit of info about the event so that we can decide when we want to use it on our end.

    I bug reported this when it also caused issues with our project, and was just told it was by design.
     
    scionious likes this.
  4. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    Yeah got the same response for my bug report. Its a bit insane though having a event called OnTriggerEnter/Exit that triggers when you toggle iskinimatic state.

    Unity should have kept it as is and abstracted the change to a new event if people are interested in knowing when internal flags are changed in PhysX
     
    scionious likes this.
  5. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    Also there is no clean way of working around this without introducing alot of complexity in your domain
     
  6. lrb

    lrb

    Joined:
    Jun 21, 2014
    Posts:
    27
    Same issue here!