Search Issue Tracker

Duplicate

Votes

31

Found in

5.1.2p3

Issue ID

718717

Regression

Yes

[TriggerCollider] OnTriggerStay is not called for child objects

Physics

-

Steps to reproduce:

1. Open the attached project
2. Open and play 'trigger' scene
3. Open the scene view and move the 'Parent' game object over other cubes in 2D view
4. See the console as you move the 'Parent'. Notice only OnTriggerEnter() functions get called. OnTriggerStay() is not called

Note: If the 'Trigger' game object is not a child of other object, the OnTriggerStay function gets called as expected.

Comments (13)

  1. shubhamswaraj2021

    Aug 18, 2020 09:26

    good one <a href="https://www.lyricsauto.com">lyricsauto</a>

  2. Looksoft

    Nov 30, 2015 09:05

    Same Problem :/
    version 5.2.3f1

    It does not work even if the parent supports empty OnTriggerEnter / Stay / Etc.

  3. MortenSkaaning

    Oct 22, 2015 08:44

    the workaround is to add an empty OnTriggerXXX on the parent GO with the Rigidbody.

  4. MortenSkaaning

    Oct 22, 2015 08:17

    Hi,

    It seems not being able to see the duplicate bug Id is an oversight in the issuetracker.

    In any case, this is duplicate of bug 714376 "OnTriggerStay doesn't get called at all or gets wrong collider back". The good news is that we fixed the bug and the fix is on it's way to 5.3 and 5.2.

    Is getting the fix to 5.1 absolutely critical for you?

    Regards,
    Morten

  5. SteveSwink

    Oct 21, 2015 04:16

    This is flagged as duplicate...where's the original bug? This is still broken for us, mos def!

  6. We4Kingz1

    Oct 20, 2015 01:43

    For me it doesn't work even if it isn't a child. Anyone have a fix?

  7. brettj

    Sep 22, 2015 16:28

    As posted here (http://forum.unity3d.com/threads/ontriggerstay-stopped-work-in-5-2-0f3-version.353890/), there is a workaround:

    Add an OnTriggerStay call to the parent object, and the child object started getting the callbacks again.

  8. k_Will

    Sep 14, 2015 14:27

    Also occur in version 5.2.0f3.

  9. dcarrigg

    Sep 10, 2015 16:51

    We are seeing this issue currently after updating our project to 5.2.0f3.

  10. CallOfButy

    Sep 10, 2015 14:46

    To further note, it appears that adding a rigidbody to the OnTrigger scripted object allows OnTriggerStay events to be called even when its parent object has a rigidbody.

    This does not work:
    -> Parent (has rigidbody)
    ---> Child (has OnTrigger script)

    This works:
    -> Parent (has rigidbody)
    ---> Child (has rigidbody, OnTrigger script)

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.