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
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
- White lighting artifact when a point light with a small emission range and "Hard Shadows" touches an object while a directional light with "Soft Shadows" and another point light are present
Add comment