Search Issue Tracker
Fixed in 5.5.0
Votes
0
Found in
5.3.4f1
Issue ID
786032
Regression
No
OnTriggerEnter2D is called instead of OnTriggerStay2D when Collider2D geometry properties are being modified
How to reproduce:
1. Open the attached project
2. Open and play Example scene
3. In the Scene view, select Trigger2 (red). Trigger2 contains a kinematic box trigger set to 'Never Sleep'.
4. Drag Trigger2 over Trigger1 and note that Trigger1 changes to blue, indicating OnTriggerStay() is received. Flickering between gray and blue is expected because OnTriggerStay2D() is not called every frame.
5. In the Inspector, use the mouse to drag the box collider's size and offset x/y values in Trigger2 while observing Trigger1.
Actual: Trigger1 will be green for most frames, indicating continuous reception of OnTriggerEnter2D(). Occaisional flickering of gray and blue occurs.
Expected: Trigger1 will be blue for most frames, indicating continuous reception of OnTriggerStay2D().
Note: One can enable "Play Automatically" in Trigger2's Animation component and repeat step 4. Animating collider causes the same issue- OnTriggerEnter2D is called instead of OnTriggerStay2D
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment