Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2020.3.X, 2021.1.X

Votes

45

Found in

2020.3.1f1

2021.1.0a10

2021.2

Issue ID

1323883

Regression

Yes

OnTriggerEnter gets called after reparenting a RigidBody

Physics

-

How to reproduce:
1. Open the user's attached project
2. Open the 'main' Scene
3. In the Hierarchy select the 'solid' GameObject
4. In the Inspector enable the 'Allow Reparent' checkbox (located under the Solid component)
5. Enter the Play mode
6. Observe the Console

Expected result: OnTriggerEnter and OnTriggerExit messages get logged only when the Sphere enters and exits the trigger volume at each end
Actual result: The OnTriggerEnter message gets logged constantly

Reproducible with: 2020.3.1f1, 2020.3.2f1, 2021.1.0a10, 2021.2.0a10
Not reproducible with: 2018.4.33f1, 2019.4.24f1, 2020.2.7f1, 2020.3.0f1, 2021.1.0a9

  1. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0a17

  2. Response avatar

    Resolution Note (fix version 2021.1):

    Fixed in 2021.1.8f1

  3. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in 2020.3.9f1

Comments (11)

  1. 87e313d25eb9c074049d99003813588e?d=mm

    LordFluffy1

    Aug 28, 2021 06:34

    My mistake. Please disregard my previous message. It's working fine in 2020.3.11 and .17.

  2. 87e313d25eb9c074049d99003813588e?d=mm

    LordFluffy1

    Aug 28, 2021 03:19

    I am still seeing these kinds of issues in 2020.11 and 2020.17. Is this verified fixed?

  3. 46e785456f7cdc7f4f03ebefc095b6ef?d=mm

    okoUser1

    May 03, 2021 15:51

    We saw the same issue occur for 2D physics as well.

    Repro:
    * Parent a 2d object A to another object
    * Deparent A while in a trigger
    * Move A out of trigger
    * A never calls OnTriggerExit2D

    And OnTriggerEnter2D also gets called when parenting again

  4. C4902dcf927df7a300f080fab1737fd9?d=mm

    Abnormalia_

    Apr 29, 2021 09:31

    ETA I'm stuck on 2020.3.0 and this meant to be TLS damn it!

  5. 1755302aa2ccf65d3d3bda53e640d1ad?d=mm

    mattycocoa

    Apr 28, 2021 17:28

    Any word on this yet?? I want to try 2020 :(

  6. 446bc93de9964cdd47889160457e494a?d=mm

    Cloudwalker_

    Apr 25, 2021 17:54

    ETA?

  7. 0ec3623efda4a36784f62e92b41863a3?d=mm

    hung_unity298

    Apr 16, 2021 22:15

    I made another issue for OnTriggerExit, please vote there too #1329735

  8. 0465f0d2ba69965b43c04ad9941ee493?d=mm

    woistjadefox

    Apr 13, 2021 07:51

    Bump!

  9. 58740e1620a8f576fc9a57b5abeb9ab8?d=mm

    Ironbell

    Apr 12, 2021 13:00

    Same here, had to add a workaround. The OnTriggerExit that gets not called when deparenting is almost worse.

  10. 46e785456f7cdc7f4f03ebefc095b6ef?d=mm

    okoUser1

    Apr 12, 2021 12:26

    I have exactly the same problem, on trigger enter gets called when an object is reparented and is already inside the trigger. and when deparenting, it sometimes does not call on trigger exit.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.