Search Issue Tracker
Fixed
Votes
4
Found in
4.3.0f1
Issue ID
573682
Regression
No
OnTriggerEnter2D called too many times
To reproduce:
1. Open the "Unity Projects 02: 2D Platformer v2.1" from the Asset Store
2. Open the scene called "Level"
3. Attach a script with "void OnTriggerEnter2D() { Debug.Log("enter"); }" to "hero"
4. Run the scene
5. Notice how "enter" is logged many times when player gets thrown to the river by zombies (dies)
Comments (24)
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
- Objects with Universal Render Pipeline/Particles/Lit shader are always lit up when changing their Rendering Layer Mask
- PolySpatial “Trying to set shader on a Material Variant.” error is printed in the console when entering Play Mode
- Error “Shader error in 'YSCloudCover': call to 'tex3D' is ambiguous at Assets/YSCloudCoverText.shader(606) (on d3d11)“ is present when compiling tex3D shader with DXC
- Placeholder asset is not loaded with Advertisement Legacy sample when using the latest version of the package
- Addressables content build fails but the Player build is successful when building a development build
GarthWood
Jan 25, 2014 13:24
I guess I should read the comments properly first :P
GarthWood
Jan 25, 2014 13:21
Still happening in 4.3.3f1 when manually setting the position of the transform. It works fine when using AddForce(). This needs to be fixed. It's the foundation of 2D triggering using manual position updates.
MelvMay
Jan 23, 2014 11:15
This has been fixed is not in the 4.3 release but has indeed been fixed for a future release.
The relationship with the Animator component is that there was also a bug in that component which caused other components to update their transform position (even if you were not animating it). In the case of the 2D physics, this caused a RB update which then caused a re-evaluation of contacts resulting in a new "Enter" callback.
Two things have been fixed. The first is the problem in the Animator component and the second is that the 2D physics now keeps the Enter/Stay/Exit callback state even if Box2D re-evaluates contacts.
Unfortunately, this fix missed the deadline for any 4.3 fixes of this severity and will be in a future release.
KaKaGo
Jan 17, 2014 09:05
still in 4.3.3f1.
OnCollisionEnter2D has the same bug on concave Polygon2D
Fazel
Jan 13, 2014 17:34
I got the same bug. And the Stay event is bugged too in 4.3.0f4
Pat-AfterMoon
Jan 11, 2014 17:27
This Bug is really still present in 4.3.1f1, please, remove this "fixed" status!
If you take the "Unity Projects 02: 2D Platformer v2.1" as an example, It seems to be related to the Animator component, because if you deactivate this component, this bug doesn't occurs anymore.
Andrige_
Dec 16, 2013 01:15
Bug still present in 4.3.1f1.
diegzumillo
Dec 08, 2013 19:24
I'm still on the 4.3.0f4 and this bug is still there.
Tortuap
Dec 08, 2013 00:06
Still in the 4.3.1f1
AndreiKubyshkin
Nov 24, 2013 07:13
Maybe your trigger object is moving? When trigger is moving and there's no rigidbody2d component on trigger object, it behaves strange, shooting OnTriggerEnter many times.