Search Issue Tracker
Duplicate
Votes
31
Found in
5.1.2p3
Issue ID
718717
Regression
Yes
[TriggerCollider] OnTriggerStay is not called for child objects
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.
-
shubhamswaraj2021
Aug 18, 2020 09:26
good one <a href="https://www.lyricsauto.com">lyricsauto</a>
-
Looksoft
Nov 30, 2015 09:05
Same Problem :/
version 5.2.3f1It does not work even if the parent supports empty OnTriggerEnter / Stay / Etc.
-
MortenSkaaning
Oct 22, 2015 08:44
the workaround is to add an empty OnTriggerXXX on the parent GO with the Rigidbody.
-
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 -
SteveSwink
Oct 21, 2015 04:16
This is flagged as duplicate...where's the original bug? This is still broken for us, mos def!
-
We4Kingz1
Oct 20, 2015 01:43
For me it doesn't work even if it isn't a child. Anyone have a fix?
-
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.
-
k_Will
Sep 14, 2015 14:27
Also occur in version 5.2.0f3.
-
dcarrigg
Sep 10, 2015 16:51
We are seeing this issue currently after updating our project to 5.2.0f3.
-
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Undeclared identifier 'LinearToSRGB'" error is thrown when creating a color variable with HDR color mode and assigning a Custom Render Texture target in Shader Graph
- Input System package is missing when creating a new HDRP project
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
- Overlay Canvas are rendered on each split-screen camera when HDR is enabled
This is a duplicate of issue #714376