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
- TreeView Child display toggle styling becomes reversed when clicking and dragging it
- Null is returned when using FocusOutEvent.relatedTarget
- Unity_BaseInstanceID is always zero when rendering multiple meshes and instancing with the same buffer
- UI Document button's text does not resize relatively when size in percentage (%) is used
- Event.current.mousePosition has an offset of 1px along the y-axis in WebGL build when the mouse button is released
Add comment