Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.3.4f1
2019.4
2020.2
2021.1
2021.2
Issue ID
1284428
Regression
No
OnTriggerEnter and OnTriggerExit triggers get called when interacting with the Editor
How to reproduce:
1. Open tester-attached project (UI_TriggerState.zip)
2. Open the DoorTest scene
3. Enter Play Mode
4. Press Space to open the door
5. Note the OnTriggerEnter and OnTriggerExit GUI output
6. In the Hierarchy window select 'TriggerTest' GameObject, open and close its Rigidbody's Collision Detection dropdown
Expected result: OnTriggerEnter and OnTriggerExit GUI output does not change
Actual result: OnTriggerEnter and OnTriggerExit GUI output logs additional calls
Reproducible with: 2018.4.31f1, 2019.4.20f1, 2020.2.3f1, 2021.1.0b5, 2021.2.0a4
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
Resolution Note:
User is setting rigidbody position and rotation on Update(). At the very least this should only be done in FixedUpdate() unless there's a good reason to do otherwise. Also the Enter/Exit trigger calls happen not just when the Collision Detection dropdown is selected, but on a general UI update.
Because of how the project is setup, I believe under the hood the object is being moved around in-between physics updates and PhysX interprets that as the collider leaving and re-entering the trigger zone.